00:00:01 | * | junland quit (Quit: %ZNC Disconnected%) |
00:00:23 | * | fredrik92 joined #nim |
00:02:44 | * | junland joined #nim |
00:04:59 | * | krux02_ quit (Remote host closed the connection) |
00:10:58 | * | Senketsu joined #nim |
00:20:42 | * | db93858 is now known as madprops |
00:24:20 | FromDiscord_ | <Joshua S. Grant> Is there any 'documentation tool' for Nim like Mdbook for Rust or Dottydoc for Scala3; Or is it recommended to just use mkdocs or similar? |
00:24:51 | leorize | nim doc |
00:26:49 | FromDiscord_ | <Joshua S. Grant> OH WOW; Major oversite by me then, lol, sorry and thanks |
00:29:09 | skrylar[m] | thats a big jumble. nim doc is more like doxygen. mdbook is more like mkdocs or hugo |
00:30:08 | skrylar[m] | but there is an rst2html thing built in to the nim compiler too, if you don't feel like hugo/nikola/mkdocs for some reason |
00:30:11 | FromDiscord_ | <Joshua S. Grant> The relative promise of what HCR is to deliver -- has made Nim like 10x more intersting to me as someone who has barely ever touched Python; Like between that and the Lispy macro-system, it's looking so dang attractive for gamedev / live-coding |
00:34:19 | FromDiscord_ | <Joshua S. Grant> Yeah, looking more for mdbook-styled than some aproximation of api docs / annotated comments. |
00:36:30 | * | martinium quit (Changing host) |
00:36:30 | * | martinium joined #nim |
00:37:36 | skrylar[m] | i need to finally sit down with nims hcr and test it |
00:38:01 | skrylar[m] | hugo has themes like Learn which i suppose are close to mdbook |
00:38:13 | skrylar[m] | wasn't mdbook just a markdown processor written in rust |
00:38:39 | skrylar[m] | nims hcr also seems to only trigger when you trigger it, which i suppose avoids a lot of issues |
00:39:29 | skrylar[m] | not sure if anything stupid happens if you use hcr and threads |
00:40:34 | * | Senketsu quit (Quit: WeeChat 2.7) |
01:00:28 | FromDiscord_ | <Varriount> @Joshua S. Grant Keep in mind that HCR is still quite a bit finicky - it usually is in any lowish-level language that's directly compiled to machine code . |
01:07:17 | * | Trustable quit (Remote host closed the connection) |
01:09:39 | * | Senketsu joined #nim |
01:11:10 | skrylar[m] | yea but being able to swap a couple of functions can be enough |
01:11:49 | skrylar[m] | i remember years ago trying to use embeddable common lisp, tiptoeing around some things like segfaults on the c side killing the whole thing |
01:19:35 | * | Senketsu quit (Quit: WeeChat 2.7) |
01:25:09 | FromGitter | <timotheecour> is there a search functionality for IRC chat logs https://irclogs.nim-lang.org/ ? the gitter search is broken beyond repair |
01:27:24 | FromGitter | <timotheecour> (or get access to the db locally) |
01:32:56 | FromDiscord_ | <Yardanico> Well one way is to use Google, it indexed quite a lot of pages in there |
01:38:19 | FromGitter | <timotheecour> ya i guess `site:https://irclogs.nim-lang.org/ “literal”` is the best bet; would still be nice to at least allow users to access db (no idea where it’s hosted, i haven’t looked into irc repo) |
01:38:54 | FromDiscord_ | <Yardanico> It's hosted on the same VPS where Nimbot itself runs |
01:40:01 | FromGitter | <timotheecour> hmm https://github.com/nim-lang/nimbot readme is rather… limited |
01:40:41 | FromDiscord_ | <Yardanico> Well I just have access to that VPS (because it runs FromDiscord as well) and so I know :P |
01:40:56 | FromDiscord_ | <Yardanico> I guess you can ask Dom so he could give you access |
01:42:15 | FromGitter | <timotheecour> ok thanks for the info; well ideall it’d be for all, not just for me; i feel it wouldn’t be hard to at least write some good local-client based search tool around gitter |
01:42:48 | FromDiscord_ | <Yardanico> Well yeah that's true the IRC logs contain tons of useful info |
01:43:14 | FromGitter | <timotheecour> likewise with forum search; searching raw data via raw db access would overcome the known limitations of forum online search |
01:43:56 | FromGitter | <timotheecour> > tons of useful info ⏎ ⏎ can’t agree more |
01:46:40 | FromDiscord_ | <Yardanico> You can also use Discord search but it's also limited, and it was bridged to IRC only around 1.5-2 years ago |
01:47:00 | FromDiscord_ | <Yardanico> But I think that sharing IRC logs should be harmless since they don't contain any private data |
01:47:43 | FromDiscord_ | <Yardanico> I can do it myself with the permission from dom (I mean make a backup of IRC logs and publish it somewhere) |
01:49:16 | FromGitter | <timotheecour> oh cool, definitely ask his permission (but he should have a strong rationale if he doesn’t agree) and provide some instructions somewhere! |
01:49:45 | FromGitter | <timotheecour> Size wise, should be small = < 1GB i assume |
01:50:03 | FromGitter | <timotheecour> (i mean probably much less) |
01:50:18 | * | Senketsu joined #nim |
01:51:08 | FromDiscord_ | <Yardanico> Well actually I just checked and in total it's 2gb |
01:51:28 | FromDiscord_ | <Yardanico> They go all way back to the middle of 2012 |
01:51:48 | FromDiscord_ | <Yardanico> also some of them are stored as .html and others as .logs (seems like marshal'd into json nim objects) |
01:51:54 | FromGitter | <timotheecour> perfect; (maybe answer here https://github.com/timotheecour/Nim/issues/126 or create a new issue) |
01:53:36 | * | chemist69_ joined #nim |
01:53:53 | FromDiscord_ | <Yardanico> yeah I commented https://github.com/timotheecour/Nim/issues/126#issuecomment-619466472 |
01:54:16 | * | Senketsu quit (Client Quit) |
01:54:21 | FromDiscord_ | <Yardanico> The first day of logging seems to be https://irclogs.nim-lang.org/30-05-2012.html btw |
01:56:54 | * | chemist69 quit (Ping timeout: 260 seconds) |
02:12:31 | * | muffindrake quit (Ping timeout: 265 seconds) |
02:14:14 | * | muffindrake joined #nim |
02:17:32 | FromDiscord_ | <Sophie> if you use a C++ library in nim code is the GC able to clean whatever memory the library allocates or do you need to do it manually |
02:38:34 | * | madpata_ joined #nim |
02:42:10 | * | madpata quit (Ping timeout: 260 seconds) |
02:47:10 | leorize | you still have to do it manually |
02:47:19 | leorize | the gc can only collect memory that belongs to it |
02:47:46 | * | fredrik92 quit (Ping timeout: 260 seconds) |
02:47:59 | leorize | disruptek: can you make your `github` module only add an Authorization when GITHUB_TOKEN exists in the environment? |
02:48:18 | leorize | not all github APIs require a token |
02:50:11 | FromDiscord_ | <Sophie> do you have a mildly long example of C++ integration code |
02:50:45 | leorize | !repo wxnim |
02:50:54 | leorize | disbot? |
02:51:43 | leorize | https://github.com/PMunch/wxnim/blob/master/examples/purewx/example1.nim |
02:51:48 | leorize | here's an example of wxwidgets |
02:52:49 | FromDiscord_ | <Sophie> I see cnew, assume you’d have cdelete or similar, makes sense, thanks! |
02:53:24 | leorize | that one in particular don't have it |
02:53:46 | leorize | because you're supposed to destroy them via their .destroy() method |
02:54:00 | leorize | but then it's wxwidgets specific :P |
02:54:03 | FromDiscord_ | <Sophie> yeah, it’s certainly a cool feature |
02:54:15 | FromDiscord_ | <Sophie> don’t think I know any other language with C++ integration |
02:56:50 | FromDiscord_ | <Varriount> Anyone here familiar with UDP? |
03:00:47 | FromDiscord_ | <Sophie> vaguely |
03:01:26 | FromDiscord_ | <Varriount> I'm looking for someone with more experience than I do to look at this PR: https://github.com/nim-lang/Nim/pull/14109 |
03:10:15 | * | noonien quit (Quit: Connection closed for inactivity) |
03:16:50 | FromDiscord_ | <Sophie> don’t know about that, hope someone can help you |
03:21:27 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:25:31 | Prestige | Elegant Beef: are you around? |
03:30:16 | FromDiscord_ | <Elegant Beef> Yes |
03:30:31 | FromDiscord_ | <Elegant Beef> Man this bot really needs mentioning discord users |
03:30:36 | FromDiscord_ | <Elegant Beef> *No i will not use irc* |
03:31:43 | FromDiscord_ | <Technicae Circuit> Haha |
03:34:42 | Prestige | Sending u a request on Discord Elegant Beef |
03:35:59 | FromGitter | <bung87> how to pass compile flag when using nimble build? |
03:38:04 | shashlick | Use a cfg file |
03:39:29 | FromGitter | <bung87> I'm writing a tool so , |
03:41:54 | FromGitter | <awr1> @bung87 use a nimble task or add a cfg file |
03:43:33 | FromGitter | <bung87> `build [opts, ...] [bin] ` what's the opts here |
03:43:56 | FromGitter | <bung87> when I run nimble build --help |
03:44:03 | FromGitter | <awr1> i think that is just flags for compiler |
03:45:21 | FromDiscord_ | <Technicae Circuit> Nim is OP |
03:45:49 | FromGitter | <bung87> hmm I may need read more nimble source code.. |
03:46:24 | FromGitter | <awr1> ya im looking at it rn |
03:46:39 | FromGitter | <awr1> it looks like it just passes cmd line args to compiler |
03:48:47 | shashlick | It does yes |
03:49:00 | FromGitter | <awr1> i just tested it too |
03:49:53 | shashlick | @awr1 since you are here, wanted to let you know that ast2 isn't in nimterop 0.4.4 |
03:50:14 | FromGitter | <awr1> oh really |
03:50:17 | shashlick | It's in master and I'm yet to tag it officially in 0.5.0 |
03:50:40 | shashlick | Working on various fixes and improvements |
03:50:50 | shashlick | Change log, etc |
03:50:58 | FromGitter | <awr1> LMK when you tag it so i can change cpuwhat |
03:51:04 | shashlick | Will do |
03:51:30 | shashlick | Slowed down due to thumb pain |
03:51:35 | FromGitter | <bung87> `nimble build -d:release` will work? |
03:51:43 | shashlick | Yes should |
03:51:48 | FromGitter | <awr1> i will probably remove the hard nimterop dependency but keep it under a when branch |
03:51:52 | FromGitter | <awr1> *the old code |
03:53:37 | FromDiscord_ | <Technicae Circuit> Is it possible for me to be able to 'import' .so files? |
03:53:42 | * | silvernode joined #nim |
03:53:50 | FromGitter | <awr1> i've been pining to possibly add ISPC support for it future, i don't quite have a plan yet for how to go about though |
03:53:51 | FromGitter | <awr1> https://ispc.github.io/ |
03:54:27 | shashlick | Yes look at dynlib and importc |
03:54:29 | FromGitter | <bung87> ah yes it works, I mis read the stdout, `Debug build;` info belongs the tool |
03:54:57 | FromDiscord_ | <Technicae Circuit> Thanks |
03:56:02 | FromGitter | <awr1> using intrinsics in GCC/Clang are annoying if you want to make portable software |
03:56:32 | shashlick | What do you want to import TC |
03:57:27 | shashlick | You usually need to make a wrapper, as we call it, of the C functions you want to import |
03:57:47 | FromGitter | <RocksteadyTC> is there something like NVM for nim? |
03:58:01 | FromGitter | <awr1> choosenim |
03:58:09 | FromGitter | <awr1> https://github.com/dom96/choosenim |
03:58:10 | FromGitter | <RocksteadyTC> I'm trying to get an older app to run, and the error message is quite cryptic, but a friend gets it to run no problem in 0.17.2 |
03:58:14 | FromGitter | <RocksteadyTC> thanks @awr1 |
03:59:10 | shashlick | What's the error |
04:01:15 | FromGitter | <bung87> https://github.com/nim-lang/niminst I'm wondering this lib really in used? |
04:01:59 | FromGitter | <bung87> I can't get useful info from readme.txt |
04:02:39 | FromGitter | <awr1> https://github.com/nim-lang/niminst/blob/master/niminst.txt |
04:03:01 | FromGitter | <awr1> looks like you were looking at the wrong txt |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:42 | * | supakeen joined #nim |
04:07:35 | FromGitter | <bung87> oh, it should combine the link you provider and https://github.com/nim-lang/niminst/blob/master/niminst.nim `const Usage ` to readme |
04:08:02 | * | zacharycarter quit (Ping timeout: 260 seconds) |
04:08:28 | shashlick | It's used to create the zip file |
04:08:41 | shashlick | See koch |
04:15:56 | FromGitter | <bung87> so , for macos it use zip packaging files right? |
04:16:26 | shashlick | Posix is the xz file |
04:16:54 | shashlick | But all three can be recompiled from scratch on any other |
04:20:58 | FromGitter | <bung87> ok thank you , then I 'm not reinventing the tool. |
04:21:52 | shashlick | What do you need |
04:24:05 | FromGitter | <bung87> (https://files.gitter.im/nim-lang/Nim/GDba/Screenshot-2020-04-26-at-12.23.53-PM.png) |
04:24:40 | FromGitter | <bung87> I wrote this, could be part of webgui lib |
04:26:04 | FromDiscord_ | <Technicae Circuit> Can someone tell how easy my Python script (https://paste.pythondiscord.com/fitusadogi.py) would be to port to Nim? |
04:30:41 | FromGitter | <bung87> https://github.com/bung87/nim-pymod |
04:31:54 | * | gmpreussner quit (Ping timeout: 240 seconds) |
04:32:36 | FromGitter | <bung87> oh wrong repo , it's nim to py |
04:33:17 | shashlick | You can convert line by line in 10 minutes |
04:33:56 | shashlick | It's short and doesn't import any 3rd party stuff |
04:34:00 | FromGitter | <bung87> https://github.com/oumugai/py2nim/blob/master/py2nim.py |
04:35:52 | FromGitter | <bung87> then using regex replace , think this would be the short way |
04:37:18 | * | nsf joined #nim |
04:37:49 | FromGitter | <bung87> also could build the py code to .so and import it in nim? |
04:41:06 | FromDiscord_ | <Technicae Circuit> Thanks :p |
04:45:24 | * | gmpreussner joined #nim |
04:46:56 | * | couven92 quit (Ping timeout: 244 seconds) |
04:57:32 | * | narimiran joined #nim |
04:58:22 | * | silvernode quit (Ping timeout: 260 seconds) |
05:10:48 | FromDiscord_ | <Ahri Fox> im new to nim, i cant figure out what to do: int var (that takes command line argument) cant evaluate at runtime (due to?) custom type that uses it. if types are at compile time and wont accept it, how else should i do it? https://play.nim-lang.org/#ix=2jBU |
05:12:06 | * | cyraxjoe quit (Ping timeout: 256 seconds) |
05:12:10 | * | MightyJoe joined #nim |
05:12:26 | Prestige | maxOps is a variable but arrays are evaluated at compile time |
05:12:37 | Prestige | So I think you can't do array[maxOps, array[2, int]] |
05:12:43 | narimiran | use `seq` |
05:12:46 | Prestige | ^ |
05:12:59 | FromDiscord_ | <Ahri Fox> alrighty, thanks for the info |
05:20:16 | * | dadada joined #nim |
05:20:41 | * | dadada is now known as Guest94596 |
05:20:49 | * | narimiran_ joined #nim |
05:21:02 | * | narimiran quit (Read error: Connection reset by peer) |
05:25:31 | * | Romanson joined #nim |
05:27:30 | FromGitter | <awr1> has anyone ever tried to generate C code (or more specifically C-like code) using the macro system directly? either through the compiler libs (though I don't know of any interface in the compiler libs that allows NimNode *directly* to be reformed into PNodes) or some other means? |
05:28:14 | FromDiscord_ | <Technicae Circuit> I don't know what you mean 😅 |
05:28:57 | FromDiscord_ | <Technicae Circuit> Anyone know if a class system like `class name(classToInherit)` will be a thing? |
05:29:30 | FromGitter | <awr1> come to think of it i suppose the shader generation libs i've seen kinda count |
05:33:27 | * | rockcavera quit (Remote host closed the connection) |
05:37:25 | FromDiscord_ | <Elegant Beef> Well technicae with the macro system that is possible but nim has inheritance so depending on what you need that's in already |
05:38:41 | FromGitter | <awr1> i'm considering approaches to an ISPC library for nim |
05:39:01 | FromDiscord_ | <Technicae Circuit> I want to be able to have a class that can accept arguments |
05:39:50 | FromDiscord_ | <Elegant Beef> What do you mean? |
05:39:51 | FromGitter | <awr1> where individual functions based on a nim subset could be compiled to the ISPC language |
05:40:07 | FromDiscord_ | <Elegant Beef> class that can accept arguements? |
05:40:43 | FromDiscord_ | <Technicae Circuit> Like a python class |
05:40:47 | FromDiscord_ | <Technicae Circuit> With an init function |
05:40:49 | FromGitter | <awr1> what is missing from `type Foo = object of Bar` for you |
05:40:54 | FromGitter | <awr1> oh init functions |
05:41:02 | FromDiscord_ | <Technicae Circuit> Yeah :p |
05:41:16 | FromDiscord_ | <Elegant Beef> you mean a constructor? |
05:41:24 | FromDiscord_ | <Technicae Circuit> Yeah |
05:41:24 | FromGitter | <awr1> nim probably will not get user definable implicit ctors |
05:41:31 | FromDiscord_ | <Technicae Circuit> Damn |
05:41:38 | FromDiscord_ | <Technicae Circuit> I tried making my own hacky version |
05:41:50 | FromDiscord_ | <Technicae Circuit> But I can't really do it well |
05:41:54 | FromDiscord_ | <Elegant Beef> i mean that's what people normally do `newObject` |
05:42:08 | FromDiscord_ | <Technicae Circuit> I can probably do it with more effort |
05:42:25 | FromDiscord_ | <Technicae Circuit> How would newObject work? |
05:42:32 | FromGitter | <awr1> https://forum.nim-lang.org/t/1190 |
05:42:35 | FromDiscord_ | <InventorMatt> https://nim-by-example.github.io/macros/ |
05:42:45 | FromDiscord_ | <Technicae Circuit> Also, the reason i wanna do it like this is because i am making a Python module in Nim |
05:42:47 | FromDiscord_ | <InventorMatt> there is an example there that looks close to what you want |
05:43:01 | FromGitter | <awr1> standard nim way is you make a explicit proc that constructs things |
05:43:22 | FromGitter | <awr1> pretty straightforward imo |
05:44:03 | FromDiscord_ | <Technicae Circuit> Okay then, thanks |
05:44:06 | FromGitter | <awr1> if the issue for you is less that "you have to call ctors" |
05:44:17 | FromGitter | <awr1> and more that you want a ctor-ish definition in line with the object def |
05:44:20 | FromGitter | <awr1> you can do that with macros |
05:44:41 | FromDiscord_ | <Technicae Circuit> Okay, thanks |
05:45:05 | FromDiscord_ | <Technicae Circuit> I might just use tables with procs |
05:47:29 | FromDiscord_ | <Technicae Circuit> Can I define a proc inside of a proc? |
05:47:46 | FromGitter | <awr1> yes |
05:48:11 | FromGitter | <awr1> it will have closure capabilities unless you specify `{.nimcall.}` |
05:49:11 | FromDiscord_ | <Technicae Circuit> Thanks |
05:52:45 | Prestige | Is there a way to run a command in nimscript in the background? I was trying exec "my command &" but that doesn't work |
05:53:19 | * | dddddd quit (Remote host closed the connection) |
05:55:47 | FromDiscord_ | <Varriount> Prestige: Why do you need to run a command in the background? |
05:56:51 | Prestige | I'm trying to set up a nimble task to run my setup to manually test my WM, which launches Xephyr in the background then runs my WM on the new display |
05:57:12 | Prestige | currently I'm using a bash script, was hoping to get it running via nimble or a nim script |
05:57:33 | FromDiscord_ | <Varriount> Prestige: Have nimble run the bash script? |
05:57:49 | FromDiscord_ | <Varriount> Sorry, nimscript |
05:58:08 | FromDiscord_ | <Varriount> Have nimscript execute the bash script |
05:58:46 | Prestige | I mean atm I'm just doing ./run.sh, would be nice to just be able to add it to my nimdow.nimble and not have an external script at all |
05:59:03 | Prestige | Is there no way to run a command in the background and continue execution? |
05:59:38 | FromDiscord_ | <Varriount> With Nim, yes. With nimscript, I don't know |
05:59:51 | Prestige | Ah okay, thanks |
06:04:19 | * | xcm quit (Remote host closed the connection) |
06:06:30 | * | xcm joined #nim |
06:10:04 | FromDiscord_ | <Elegant Beef> Man varriount you need an avatar that fucked with me for a good 10 seconds |
06:10:28 | FromDiscord_ | <Elegant Beef> Prestige you can use nimble build tasks if you want |
06:10:42 | FromDiscord_ | <Elegant Beef> but yea no clue about the non blocking |
06:11:06 | Prestige | Yeah I was using it to build but got hard stopped when I couldn't fork a process to the bg |
06:11:33 | Prestige | Looked through the docs a couple times but haven't found anything yet |
06:12:00 | Prestige | I would assume there's a way but 🤷 |
06:12:23 | FromDiscord_ | <Technicae Circuit> Anyone know how I'd make an asynchronous function for use in python using Nimpy. |
06:12:29 | FromDiscord_ | <Technicae Circuit> ?* |
06:14:48 | FromDiscord_ | <Varriount> @Elegant Beef There. |
06:14:55 | FromDiscord_ | <Elegant Beef> thanks 😄 |
06:16:07 | FromDiscord_ | <Varriount> @Technicae Circuit How are you interfacing with Bumpy? |
06:16:16 | FromDiscord_ | <Varriount> *Numpy |
06:16:57 | FromDiscord_ | <Technicae Circuit> What? |
06:17:02 | FromDiscord_ | <Technicae Circuit> Nimpy |
06:17:12 | FromDiscord_ | <Technicae Circuit> https://github.com/yglukhov/nimpy |
06:17:31 | FromDiscord_ | <Technicae Circuit> I can make Python functions in Nik or import Python modules |
06:17:48 | FromDiscord_ | <Elegant Beef> See this is why we need explicit names like `NimPythonBridge` |
06:17:51 | FromDiscord_ | <Elegant Beef> 😄 |
06:17:56 | FromDiscord_ | <Technicae Circuit> Haha |
06:22:12 | FromDiscord_ | <Varriount> @Technicae Circuit What do you mean by async? Python async or Nim async |
06:23:22 | FromDiscord_ | <Technicae Circuit> Python async |
06:23:38 | FromDiscord_ | <Technicae Circuit> I need to make an asynchronous Python function in Nim |
06:24:02 | FromDiscord_ | <Technicae Circuit> I'm basically wrapping httpclient for Python because it's faster then any Python alternative as of now |
06:24:12 | FromDiscord_ | <Technicae Circuit> And i need it to be asyncronous |
06:24:28 | FromDiscord_ | <Varriount> Hm. |
06:25:02 | FromDiscord_ | <Varriount> What I would do, is create a regular Nim function and wrap that in an iterator which handles the state management. |
06:25:49 | FromDiscord_ | <Varriount> That being said |
06:26:03 | FromDiscord_ | <Varriount> You may just need to run it in another thread. |
06:36:16 | FromDiscord_ | <Technicae Circuit> Threading doesn't like async |
06:36:25 | FromDiscord_ | <Technicae Circuit> Okay then, thanks |
06:36:48 | FromDiscord_ | <Technicae Circuit> Also, if you know Python, how do i use an executor? :P |
06:39:43 | FromDiscord_ | <Elegant Beef> Why are you using nimpy if i may ask? |
06:40:45 | FromDiscord_ | <Technicae Circuit> Because it's easy to make Python extensions with Nimpy |
06:40:55 | FromDiscord_ | <Technicae Circuit> And i am still a python programmer at heart |
06:41:08 | FromDiscord_ | <Technicae Circuit> I am too attached to python but i also love Nim |
06:41:10 | FromDiscord_ | <Technicae Circuit> So |
06:41:47 | FromDiscord_ | <Elegant Beef> ~~But python is so icky~~ Ah, ok |
06:42:12 | FromDiscord_ | <Technicae Circuit> Haha |
06:47:00 | FromDiscord_ | <Varriount> ... I like Python |
06:47:40 | FromDiscord_ | <Elegant Beef> It's ok to be objectively wrong, it happens to some people sometimes 😛 |
06:47:53 | FromDiscord_ | <Varriount> @Technicae Circuit Personally, I would attempt to write a Nim dll, and interface with it via CFFI |
06:48:03 | FromDiscord_ | <Technicae Circuit> I use windows :p |
06:48:18 | FromDiscord_ | <Technicae Circuit> And using cffi isn't allowed on PyPi i think |
06:48:31 | FromDiscord_ | <Varriount> You mean Pypy? |
06:48:40 | FromDiscord_ | <Technicae Circuit> Nope |
06:48:42 | FromDiscord_ | <Technicae Circuit> PyPi |
06:48:42 | FromDiscord_ | <Varriount> PyPI is the package index |
06:48:46 | FromDiscord_ | <Technicae Circuit> Yeah |
06:48:58 | FromDiscord_ | <Technicae Circuit> Where you upload packages |
06:49:18 | FromDiscord_ | <Technicae Circuit> You can't use cffi packages i think on PyPi |
06:49:19 | FromDiscord_ | <Varriount> Uh... I don't see why using a particular dependency would bar you from uploading or using the package index. |
06:49:48 | FromDiscord_ | <Technicae Circuit> They don't allow you to upload other languages that need an additional compiler i think |
06:49:54 | FromDiscord_ | <Technicae Circuit> I can't remember exactly tho |
06:49:54 | FromDiscord_ | <Varriount> I know that Numpy and some other scientific libraries use it. |
06:50:00 | FromDiscord_ | <Technicae Circuit> They use Cython |
06:50:08 | FromDiscord_ | <Varriount> Upload the generated Nim C code |
06:50:23 | FromDiscord_ | <Technicae Circuit> Since setuptools and distutils can compile the C by default |
06:50:33 | FromDiscord_ | <Technicae Circuit> That's distro and arch specifc |
06:50:38 | FromDiscord_ | <Technicae Circuit> Specific* |
06:50:42 | FromDiscord_ | <Varriount> Who is the "they" here? |
06:51:06 | FromDiscord_ | <Technicae Circuit> They as in the people who run PyPi |
06:51:43 | FromDiscord_ | <Varriount> PyPI is just a package index. The maintainers don't particularly care what dependencies or tools your package requires to run. |
06:52:04 | FromDiscord_ | <Varriount> (maintainers, as in the ones who maintain the index) |
06:52:06 | FromDiscord_ | <Technicae Circuit> Hm |
06:52:24 | FromDiscord_ | <Technicae Circuit> Well, I don't think people will want another compiler on their system |
06:53:12 | FromDiscord_ | <Varriount> Use the C files generated by Nim, and have setuptools/distutils/pip build it. |
06:53:29 | FromDiscord_ | <Varriount> Or better yet, supply a wheel with pre-built binaries |
06:53:30 | FromDiscord_ | <Technicae Circuit> But the C files are platform specific |
06:53:38 | FromDiscord_ | <Technicae Circuit> A wheel is good |
06:53:53 | FromDiscord_ | <Technicae Circuit> But idk how to make them 😅 |
06:54:29 | FromDiscord_ | <Varriount> In Nim? They are OS and architecture specific, but they're aren't that many combinations of those, and the Nim compiler can generate code for all of them from one system. |
06:55:24 | FromDiscord_ | <Varriount> 64/32 bit x Windows/Linux/OSX/BSD |
06:55:36 | FromDiscord_ | <Technicae Circuit> Yeah |
06:55:45 | FromDiscord_ | <Technicae Circuit> Do you know how to make wheels btw? |
06:56:00 | FromDiscord_ | <Technicae Circuit> Oh yeah, Nimporter can make wheels iirc |
06:56:12 | FromDiscord_ | <Varriount> Unfortunately I do not. I have not written C extensions before. |
06:56:44 | FromDiscord_ | <Varriount> That being said, there's probably a dearth of information available on the interwebz |
06:57:16 | FromDiscord_ | <Technicae Circuit> Damn |
06:57:23 | FromDiscord_ | <Technicae Circuit> Thanks |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:44 | * | gmpreussner joined #nim |
07:08:22 | FromDiscord_ | <Varriount> @Technicae Circuit Here's a project that uses CFFI - https://github.com/pyca/cryptography/blob/d75335a7de77d4294bea29d03928229a83a77493/setup.py |
07:08:54 | FromDiscord_ | <Varriount> As you can see, it's completely simple and straightforward, just like all Python packaging processes. |
07:09:22 | FromDiscord_ | <Varriount> \sarcasm\ |
07:09:30 | FromDiscord_ | <Technicae Circuit> Oh cool |
07:11:50 | * | Intensity quit (Remote host closed the connection) |
07:12:54 | FromDiscord_ | <Varriount> The main things I see are adding cffi to setup_requires and a bunch of the side effect stuff |
07:14:27 | FromDiscord_ | <Varriount> https://cffi.readthedocs.io/en/latest/cdef.html#preparing-and-distributing-modules |
07:14:36 | FromDiscord_ | <Varriount> That should also help |
07:20:24 | FromDiscord_ | <Technicae Circuit> Thanks |
07:31:14 | * | martinium quit (Ping timeout: 244 seconds) |
07:39:16 | * | letto_ quit (Read error: Connection reset by peer) |
07:41:39 | * | letto joined #nim |
07:42:30 | * | madpata_ quit (Quit: Lost terminal) |
07:48:27 | livcd | There's a lot of people here from discord recently wow |
07:51:26 | FromDiscord_ | <Technicae Circuit> Haha |
07:51:40 | FromDiscord_ | <Technicae Circuit> There's 800 people in the discord |
07:54:54 | livcd | Amazing. Nim is really taking off. |
07:55:18 | FromDiscord_ | <Technicae Circuit> Mhm |
07:57:31 | FromGitter | <bung87> can I static read binary data? |
07:57:58 | livcd | bung87: yes |
07:58:12 | FromGitter | <bung87> really? how to do that |
07:58:42 | livcd | Sorry I am a bit tipsy. But I staticRead an exe (a driver) and I install it before I execute my business logic in a Nim program |
07:58:48 | livcd | Is that what you were asking? |
07:59:58 | FromGitter | <bung87> not really understood your logic , I mean eg static read a zip file |
08:00:33 | livcd | Yes you can |
08:01:20 | livcd | You decompress at runtime the zip file |
08:05:33 | FromGitter | <bung87> before that I need convert it to cstring? |
08:10:52 | FromDiscord_ | <Elegant Beef> *Someone want to explain what "Static reading" is?* |
08:11:08 | livcd | i dont think you have to. You can just dump the zip file and decompress. |
08:11:15 | * | lritter joined #nim |
08:11:38 | FromDiscord_ | <Elegant Beef> Ah it's an actual function |
08:11:39 | FromDiscord_ | <Elegant Beef> nvm |
08:11:48 | FromGitter | <bung87> ok,thank you, I'll try |
08:12:16 | livcd | Elegant Beef: for resource embedding in the binary |
08:14:04 | FromDiscord_ | <Elegant Beef> Yea i looked it up when i noticed you wrote it camel cased |
08:15:19 | livcd | Elegant Beef: where are you from? |
08:15:39 | FromDiscord_ | <Elegant Beef> Canada, why? |
08:17:15 | livcd | Ah just thinking about when the people are most active on this channel |
08:17:27 | livcd | I would say it's still very EU centric |
08:17:38 | FromDiscord_ | <Elegant Beef> Ah yea |
08:18:34 | FromDiscord_ | <Technicae Circuit> :p |
08:18:51 | Prestige | Some of us in the US just don't sleep |
08:19:00 | Prestige | er, western hemisphere |
08:20:01 | FromDiscord_ | <Elegant Beef> Man this dude just said Canada is in the US |
08:20:17 | Prestige | Canada is just the USA's favorite hat, Beef |
08:20:25 | FromDiscord_ | <Elegant Beef> Im thinking with your president tweeing "liberate X state" we might come down there and do it |
08:20:30 | FromDiscord_ | <Elegant Beef> tweeting* |
08:21:00 | Prestige | I try to not read or hear anything he says |
08:22:00 | livcd | I dont see any difference between the US and Canda :P |
08:22:02 | livcd | sorry guys |
08:22:48 | FromDiscord_ | <Elegant Beef> Damn |
08:23:01 | livcd | But seriously :P |
08:23:07 | FromDiscord_ | <Elegant Beef> We have a parlimentary system, and most importantly garuentee healthcare as a human right |
08:23:40 | livcd | That's just nuances. You coul do the same as US state |
08:24:34 | FromDiscord_ | <Elegant Beef> Lol im certain the federal US government would like it if you made a new federal government in your state, and disregarded them 😄 |
08:25:13 | livcd | Politics aside I really see you like Germany and Austria |
08:26:11 | FromDiscord_ | <Varriount> @Elegant Beef If it weren't for family, I would seriously consider trying to immigrate to Canada |
08:26:22 | livcd | Me too. |
08:26:28 | Prestige | Where are you all? |
08:26:35 | livcd | I am in Austria |
08:26:39 | FromDiscord_ | <Varriount> East coast of the US |
08:26:46 | Prestige | Same Varriount |
08:27:09 | livcd | I would immigrate to Canada just because it's easier in Canada than in the US. I would very much prefer the US though. |
08:27:11 | FromDiscord_ | <Elegant Beef> Family schmamily, not like US/Canada has the worlds strictist border 😄 |
08:27:24 | livcd | Elegant Beef: Costs. |
08:27:42 | FromDiscord_ | <Varriount> I like being within driving distance of my family |
08:28:02 | FromDiscord_ | <Varriount> (so you can guess that I'm not in Vermont) |
08:28:31 | FromDiscord_ | <Elegant Beef> Well the trick is you get so good at your job you own the company and get a private jet, this way you're preparing for failure 😛 |
08:28:40 | Prestige | two guesses.. Georgia or Marland? |
08:28:57 | Prestige | Maryland* |
08:29:47 | livcd | Elegant Beef: Where are you in Canada? |
08:29:52 | FromDiscord_ | <Elegant Beef> Also bold of you to know i know the placement of any states that arent major states ie NY,Cali,Washington,Florida,Texas,Louisana,Alabama,DC/Maryland |
08:30:02 | FromDiscord_ | <Elegant Beef> That's all my US geography 😄 |
08:30:34 | livcd | It does not matter |
08:30:41 | * | waleee-cl joined #nim |
08:31:00 | livcd | It's not like I can pin point any not so known german cities in Germany :P |
08:31:24 | FromDiscord_ | <Elegant Beef> I mean it's a very american thing to expect people to know where states are |
08:31:45 | livcd | It's a european thing to know where at least the capital cities are |
08:31:46 | FromDiscord_ | <Elegant Beef> They got 50 states and have states with like 800k people in them, why are you dividing up land so agressively! |
08:32:13 | FromDiscord_ | <Varriount> To be fair, although I can list all the states, I would have a hard time placing them all on a map |
08:32:47 | livcd | Ahh I would not |
08:33:03 | livcd | I mean i learned that at high school |
08:33:42 | Prestige | Same |
08:34:43 | FromDiscord_ | <Varriount> livcd: There is a joke about a European friend/relative coming to visit someone on a state on the East coast (say, New York) and suggesting a "short" trip to visit Texas (Midwest) or California (West) |
08:35:14 | livcd | short trip aye |
08:36:05 | FromDiscord_ | <Elegant Beef> There is another joke about a European suggesting using public transit in NA |
08:36:10 | FromDiscord_ | <Elegant Beef> Get it cause most of it's garbage |
08:36:12 | FromDiscord_ | <Elegant Beef> 😛 |
08:36:14 | livcd | Idk I always felt the US to be so surreal |
08:36:29 | livcd | I have to visit to really understand if it's real or not :P |
08:36:46 | FromDiscord_ | <Varriount> @Elegant Beef That's highly dependant on the state |
08:36:48 | livcd | I never had such feeling about Asia |
08:36:58 | FromDiscord_ | <Elegant Beef> >public transit in NA |
08:37:05 | livcd | public transit is overrated |
08:37:12 | livcd | idc tbh |
08:37:31 | * | Vladar joined #nim |
08:38:03 | livcd | It's not a religion to me. It's nice if you have an access to an efficient public transit. But if you commute by car it's also nice. |
08:38:03 | Prestige | It's nice to have esp in big cities |
08:38:12 | FromDiscord_ | <Elegant Beef> Well i dont drive and have no interest in getting a license |
08:38:13 | livcd | I used to drive in Seoul |
08:38:24 | livcd | I ver much preffered driving in Seoul than using a public transit in Seoul |
08:38:25 | FromDiscord_ | <Varriount> I love public transit |
08:38:26 | FromDiscord_ | <Elegant Beef> I dont need a car, especially in this small town im in |
08:38:34 | livcd | And Seoul has one of the best public transit systems |
08:38:50 | livcd | express subway lines aaaaahhhh |
08:40:46 | livcd | I like Singapore the most though |
08:44:44 | livcd | Elegant Beef: do you live in any of the big cities in Canada? |
08:49:28 | FromDiscord_ | <Elegant Beef> Nope |
08:49:31 | FromDiscord_ | <Elegant Beef> Bumfuck nowhere |
08:51:20 | * | ask6155 joined #nim |
08:59:36 | Prestige | Are there plans to remove the necessity of forward declaring procs when they aren't listed in order? |
09:01:05 | livcd | wait is not that a feature? :P |
09:01:23 | FromDiscord_ | <Elegant Beef> Isnt that in C/C++? |
09:02:32 | FromDiscord_ | <Elegant Beef> Ah i totally know words and what they mean |
09:02:38 | Prestige | Currently you have to forward declare procs unless they are declared before they are called |
09:02:50 | Prestige | i.e. you can't call a proc before it's declared |
09:03:56 | FromDiscord_ | <Elegant Beef> isnt it like that with C and C++ |
09:04:12 | Prestige | Yeah, afaik |
09:04:15 | FromDiscord_ | <Elegant Beef> I feel like as annoying as it is it's fine |
09:04:46 | FromDiscord_ | <Elegant Beef> It does suck if you want to call a function from inside another function but the function is above it for good reason |
09:05:25 | Prestige | I prefer listing my functions in essentially the reverse order that is required to not have them forward declared, for readability. So I'm forward declaring all my procs, usually |
09:06:45 | FromDiscord_ | <Elegant Beef> Eh, i just declare when/where i need without thinking and let the red squiggle tell me if i do good |
09:06:53 | * | Romanson quit (Quit: Connection closed for inactivity) |
09:11:52 | Prestige | I think it's something that could be done, would be nice. Just don't know if it's even a considered proposal atm |
09:30:41 | * | Hideki_ joined #nim |
09:31:20 | * | Hideki_ quit (Remote host closed the connection) |
09:34:58 | FromGitter | <jorjun_twitter> Is there a nice idiomatic way of attaching a few constant static properties to an object? |
09:44:21 | FromDiscord_ | <InventorMatt> is wxnim pretty much dead by now or are there plans to begin updating it again in the future? |
09:45:04 | * | xet7 quit (Quit: Leaving) |
09:47:48 | * | xet7 joined #nim |
09:50:44 | livcd | Why would it be dead? |
09:52:00 | FromDiscord_ | <InventorMatt> There just hasn't been any updates in over a year |
09:53:33 | livcd | That's not what dead means :P |
09:54:23 | livcd | You need to deal with the fact that Nim's community is very small and a lot of libs will be maintained by solo developers. |
09:55:15 | FromDiscord_ | <InventorMatt> I know and I understand that. I just really enjoy the language and want to be able to get more out of it. |
09:56:04 | livcd | Right now you are talking about PMunch's fork right? |
09:57:24 | dom96 | There are thousands of possible libraries that could be created and much less Nim developers that have time to maintain them. If there is a library that you care about, help us maintain it :) |
09:57:52 | FromDiscord_ | <InventorMatt> Yeah, that's the one. |
09:58:09 | livcd | one could say jester is also abandoned |
09:58:10 | livcd | :P |
09:58:25 | dom96 | indeed |
09:58:30 | dom96 | others would say it's complete :P |
09:58:58 | narimiran_ | ahem... https://github.com/dom96/jester/pull/243 |
09:58:58 | FromDiscord_ | <InventorMatt> I've tried helping with some of the libraries but the low level stuff is hard for me to follow coming from a python background. |
09:59:02 | livcd | httpbeast windows support when! |
09:59:02 | * | narimiran_ is now known as narimiran |
09:59:27 | livcd | btw dom96 |
09:59:31 | livcd | what's your bread and butter @ FB? |
09:59:45 | dom96 | narimiran, yeah, that needs me to fix the CI, which I don't have the will for right now |
10:00:02 | dom96 | livcd, httpbeast support for Windows never |
10:00:04 | narimiran | so, you can merge it now without CI? |
10:00:12 | * | solitudesf joined #nim |
10:00:23 | narimiran | CI is already failing even without that PR |
10:00:35 | livcd | dom96: sadpandaface |
10:00:44 | dom96 | narimiran, did you try the alltest manually? |
10:00:52 | narimiran | this just unblocks me from sending a cleanup PR to nim repo |
10:01:10 | dom96 | or can you? if it compiles and runs I'll merge |
10:01:15 | narimiran | let me try |
10:01:36 | dom96 | livcd, what do you mean by "bread and butter"? lol |
10:04:18 | livcd | dom96: tech stack |
10:04:30 | livcd | basically what do you do |
10:06:35 | dom96 | A lot of Hack currently. But also some C++ and Python. |
10:07:34 | FromDiscord_ | <Rika> Hello |
10:07:47 | Prestige | o/ |
10:09:38 | FromDiscord_ | <Rika> Back to whittling on the model of tachiyomi in nim |
10:10:16 | narimiran | dom96: how long should that test take? it seems like it just hangs :/ |
10:10:29 | dom96 | narimiran, it's a server, send some requests to it |
10:10:37 | dom96 | see the file for the routes |
10:10:55 | dom96 | test a few |
10:11:02 | livcd | how's hack? |
10:11:53 | dom96 | Fairly good for a PHP fork |
10:13:30 | livcd | Did you sneak in any Nim? |
10:13:42 | * | PMunch joined #nim |
10:15:12 | dom96 | Nope, but I have been trying :) |
10:16:07 | FromGitter | <jorjun_twitter> now thinking python damages the brain the way that basic was said to do :( |
10:16:15 | narimiran | dom96: tested and it works. (i've just found another deprecated `random` in `alltest.nim`, so i force-pushed that one too) |
10:17:02 | FromGitter | <jorjun_twitter> declare a tuple of points, then wrestle with trying to iterate over it |
10:17:49 | dom96 | narimiran, cool, thanks! |
10:23:53 | FromDiscord_ | <0ffh> Q: In a library I am writing I have a few one-line convenience/readability procs that really should not result in a call/ret. Should I rather defined them as {.inline.} or as a template? |
10:24:52 | PMunch | Depends on what they do |
10:25:23 | PMunch | I tend to use templates |
10:25:30 | FromDiscord_ | <Recruit_main707> dom96 when you talk about hacks, what type of hacks? |
10:25:48 | dom96 | I'm talking about the Hack programming language |
10:26:05 | FromDiscord_ | <Recruit_main707> Lol |
10:29:00 | FromDiscord_ | <madprops> Nim is kinda hard to pun with isn't it |
10:29:21 | FromDiscord_ | <madprops> not many words end or start with nim |
10:30:10 | FromDiscord_ | <0ffh> @PMunch Yes, I think I probably should, too. Also templates are guaranteed to inline, which {.inline.} isn't, iirc. Thanks |
10:30:37 | PMunch | Yeah, templates are inlined by the Nim compiler the {.inline.} pragma is just a hint to the C compiler |
10:30:56 | PMunch | That being said if it isn't inlined it's because the C compiler deems it a performance loss to do so |
10:32:36 | FromDiscord_ | <Generic> I thought the inline pragma was performed by the nim compiler, to allow for cross module inlining outside of lto |
10:32:41 | * | dddddd joined #nim |
10:37:14 | FromDiscord_ | <Generic> I see, the inline function is copied into each generated C file as a separate function annotated as inline |
10:38:17 | FromDiscord_ | <Recruit_main707> Yep, I guess that leaves the c/c++ compiler to choose wether it’s better or not |
10:40:33 | FromGitter | <jorjun_twitter> Trying the exercism mentor assist function so don’t answer me on here. |
10:44:22 | FromGitter | <jorjun_twitter> for the next challenge I am going to prototype in Python then encode it in nim afterwards, see if that makes it less sweat |
10:53:00 | FromGitter | <jorjun_twitter> From a philosophical perspective the idea that unit testing is the One Way to develop seems come from an established ethos that coding is difficult. And it is mostly (before the rise of scripting showed us differently). But self-testing is also a form of onanistic conceit. Better to get your conciseness, model and algorithm right, and place any spare chips on that aspect of the craft. Because coding isn’t an |
10:53:00 | FromGitter | ... endless succession of input => correct_output |
10:53:45 | FromGitter | <jorjun_twitter> Or if it was I would immediately change careers. |
10:54:00 | FromGitter | <jorjun_twitter> http://claysnow.co.uk/recycling-tests-in-tdd/ |
10:57:06 | * | ask6155 quit (Quit: Lost terminal) |
10:58:01 | FromGitter | <jorjun_twitter> Perhaps I am still traumatised by sharing an office with kids far younger than me back in 2010, who placed a Darth Vader meme passively aggressively over my desks: “I find your lack of tests disturbing”. I thought, “who the fuck are you to advise me, when I have more years experience in code than you have had on earth. They got me fired a few months later.” On the plus side, I learned heaps of linux lore |
10:58:01 | FromGitter | ... from those twats which I now realise is the only way to get it, i.e. from working with other geeks. |
10:58:03 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
11:02:17 | FromDiscord_ | <Recruit_main707> jorjun_twitter: prototyping in python is not worth it imo, nim is already very clean |
11:06:58 | * | Senketsu joined #nim |
11:12:14 | FromGitter | <jorjun_twitter> @Recruit_main707 yes, I find it clean. It is me that is at fault for being oblivious about types and focussing only on rapid evolution of an algorithm. Being forced to think about architecture is a good discipline. I am at that steep part of the learning curve. But going on the faith that I will be able to craft in nim without feeling as if I am also trying to construct a c-program underneath it all.. |
11:16:57 | * | enthus1ast quit (Ping timeout: 240 seconds) |
11:17:46 | * | Guest94596 quit (Ping timeout: 260 seconds) |
11:19:01 | * | krux02 joined #nim |
11:19:36 | * | dadada joined #nim |
11:19:59 | * | dadada is now known as Guest78480 |
11:23:01 | livcd | I think prototyping is worth it if you rely on certain set of libraries that are not there yet for Nim |
11:29:25 | * | narimiran quit (Ping timeout: 244 seconds) |
11:31:07 | * | Hideki_ joined #nim |
12:05:53 | * | tane joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:47 | * | supakeen joined #nim |
12:10:30 | dom96 | https://i.imgur.com/y6vrNeE.png |
12:10:44 | dom96 | Close enough :) |
12:11:05 | dom96 | (gamelight font rendering JS vs. SDL for the same code) |
12:12:26 | PMunch | That's pretty good |
12:12:30 | PMunch | Not perfect of course |
12:13:08 | * | Senketsu quit (Quit: WeeChat 2.7) |
12:14:23 | * | Senketsu joined #nim |
12:25:43 | FromDiscord_ | <Technicae Circuit> Can someone give me an example on how i would use a C++ lib in Nim? |
12:28:13 | * | filcuc joined #nim |
12:38:21 | Araq | ok, I did it, got --gc:orc to win the havlak benchmark |
12:38:42 | Araq | 1.0s for --gc:orc, 1.4s for boehm/refc/markAndSweep |
12:38:55 | Araq | 0.7s for --gc:arc |
12:43:33 | * | Senketsu quit (Quit: WeeChat 2.8) |
12:45:00 | dom96 | what is orc? |
12:49:11 | * | inv2004 joined #nim |
12:49:15 | FromDiscord_ | <Technicae Circuit> :p |
12:49:38 | Araq | dom96: arc + a cycle collector |
12:50:29 | Araq | (so that nobody has to patch async, yay...) |
12:50:45 | inv2004 | Hello, everything is perfect with nim, except my small question :) Q: t.addColumn[int]("aaa") does not work - it says error in 2nd param, but addColumn[int](t, "aaa") work perfect. Are where any workaround I can apply? |
12:51:20 | dom96 | Araq, awesome. Does it work with async already? |
12:51:25 | FromDiscord_ | <Recruit_main707> yes, you should write [:int] |
12:51:44 | FromDiscord_ | <Rika> ive been beat |
12:51:57 | Araq | dom96: haven't tried but lots of GC tests are still red too |
12:51:57 | FromDiscord_ | <Recruit_main707> learned from the best one |
12:52:42 | Araq | dom96: I wanted to ensure I can meet my arbitrary performance requirements before continuing and the performance it ok |
12:54:04 | * | NimBot joined #nim |
12:55:33 | * | rockcavera joined #nim |
12:56:00 | FromDiscord_ | <Rika> small thought i just had, why is it "case of" rather than the more "conventional" "switch case" |
12:56:06 | FromDiscord_ | <Rika> in nim |
12:56:55 | inv2004 | ^^^ sorry, looks like my fault with string/cstring conversion |
12:59:32 | FromDiscord_ | <Rika> inv2004: what do you mean your fauly? |
12:59:44 | Zevv | wow orc wins, that's pretty sweet! |
13:01:09 | * | couven92 joined #nim |
13:03:54 | Araq | Rika: because it's less to type and felt cleaner to a non-native English speaker |
13:05:47 | FromDiscord_ | <exelotl> pascal uses case of too |
13:05:50 | FromDiscord_ | <Rika> hmm, i see, was just wondering |
13:05:59 | FromDiscord_ | <Rika> ah so we arent the only ones |
13:06:21 | Araq | yeah the Pascal family uses 'case' indeed |
13:06:41 | FromDiscord_ | <exelotl> I quite like their syntax https://castle-engine.io/modern_pascal_introduction.html#_testing_single_expression_for_multiple_values_case |
13:08:14 | skrylar[m] | hoi |
13:09:13 | FromDiscord_ | <Rika> hoi! |
13:09:30 | skrylar[m] | i see dom is also doing type related things |
13:09:47 | skrylar[m] | hoping to get the non-richtext renderer done today x.x |
13:10:02 | inv2004 | no, cstring does not matter :( t.addColumn[int]("aaa") proc addColumn[T](t: var K; name: string) \n first type mismatch at position: 2\n missing parameter: name |
13:12:36 | FromDiscord_ | <Rika> we told you what to do already] |
13:12:46 | FromDiscord_ | <Rika> `t.addColumn[:int]("aaa")` add the colon here |
13:16:17 | skrylar[m] | is --gendeps intended to take the full time to compile a module but not actually write the result to output :eyes: |
13:16:47 | skrylar[m] | i get the depfile but it doesn't also spit out the executable |
13:17:47 | * | Hideki_ quit (Remote host closed the connection) |
13:18:32 | * | Hideki_ joined #nim |
13:22:04 | inv2004 | [:T] from telegram - solved :) |
13:22:40 | * | Hideki_ quit (Remote host closed the connection) |
13:22:57 | * | Hideki_ joined #nim |
13:40:42 | * | Senketsu joined #nim |
13:41:32 | * | Senketsu quit (Client Quit) |
13:43:55 | * | natrys joined #nim |
13:44:13 | * | Senketsu joined #nim |
13:51:13 | * | Senketsu quit (Quit: WeeChat 2.8) |
13:52:07 | * | Senketsu joined #nim |
13:57:09 | Zevv | So next thing we know Nim itself will run on orc as well |
14:03:07 | * | Senketsu quit (Quit: WeeChat 2.8) |
14:14:02 | * | Senketsu joined #nim |
14:14:47 | * | filcuc quit (Remote host closed the connection) |
14:15:07 | * | filcuc joined #nim |
14:16:34 | * | Senketsu quit (Client Quit) |
14:17:48 | * | Senketsu joined #nim |
14:20:15 | * | inv2004 quit (Ping timeout: 240 seconds) |
14:32:14 | * | vesper11 quit (Read error: Connection reset by peer) |
14:36:41 | * | vesper11 joined #nim |
14:41:01 | * | zacharycarter joined #nim |
14:41:20 | FromDiscord_ | <treeform> dom96, can I get your font with "!!" missing? I did fix an issue for things missing. But it looks like it made !! in your font vanish. Fonts are really complex some times. |
14:45:11 | dom96 | hey treeform, sure |
14:45:16 | dom96 | let me open discord and send it to you |
14:48:14 | dom96 | sent |
14:48:32 | FromDiscord_ | <treeform> thanks |
14:49:00 | disruptek | i think it was leorize. |
14:49:16 | disruptek | the doofus who told me i shouldn't use radeonsi. |
14:52:28 | * | al1ranger joined #nim |
14:52:28 | * | waleee-cl joined #nim |
15:01:58 | FromDiscord_ | <kodkuce> i wnated to try that tabnine, do i have to enable nim default plugin too or what |
15:03:42 | disruptek | i thought it was pay-to-play. |
15:05:05 | zacharycarter | it was |
15:05:25 | zacharycarter | I'm still having trouble getting nim-lsp to play nice with kakoune |
15:07:23 | * | xet7 quit (Quit: Leaving) |
15:09:18 | PMunch | What's the issue |
15:12:23 | zacharycarter | I probably have something configured incorrectly because I know Solitude uses kak with lsp |
15:12:30 | zacharycarter | but jump to definition isn't working for me or references etc |
15:12:46 | solitudesf | do they never work? |
15:12:59 | zacharycarter | nope never even in the same local file |
15:13:57 | * | PMunch quit (Quit: leaving) |
15:14:40 | zacharycarter | I saw your dotfiles on github Solitude so I probably need to take a closer look at them and see what the difference is between my kakrc and yours |
15:15:55 | * | solitudesf- joined #nim |
15:18:10 | * | solitudesf quit (Ping timeout: 260 seconds) |
15:20:18 | * | inv2004 joined #nim |
15:22:25 | * | solitudesf- is now known as solitudesf |
15:22:47 | * | letto_ joined #nim |
15:24:01 | * | letto quit (Ping timeout: 246 seconds) |
15:27:34 | FromDiscord_ | <CoolMan> What would happen if I tried to create more threads than maxthreadpoolsize? |
15:29:58 | disruptek | let's just say i wouldn't want to be in the same room. |
15:30:55 | FromDiscord_ | <CoolMan> Would anything bad happen if I just set MaxThreadPoolSize to something very high |
15:31:15 | disruptek | you know what's really high right now? |
15:31:25 | disruptek | 👍this guy👍 |
15:31:44 | zacharycarter | :D |
15:32:00 | solitudesf | stop abusing substances and turn on the stream |
15:32:10 | zacharycarter | or turn on the stream while you abuse substances |
15:32:15 | zacharycarter | I'm not picky |
15:32:34 | disruptek | i'm not sure obs can actually capture video yet. |
15:33:06 | * | filcuc quit (Ping timeout: 260 seconds) |
15:33:47 | disruptek | also i don't have a web browser. |
15:33:56 | zacharycarter | what happened to it? |
15:34:06 | disruptek | it just fucked right off. |
15:34:16 | zacharycarter | hate it when they do that |
15:34:22 | disruptek | i think maybe it's on my old video card. |
15:34:30 | zacharycarter | sneaky web browser |
15:35:04 | disruptek | $ chromium --new-window 4760ms 11:34 |
15:35:06 | disruptek | Opening in existing browser session. |
15:35:23 | disruptek | is it me? |
15:35:31 | * | Hideki_ quit (Remote host closed the connection) |
15:35:31 | zacharycarter | yes |
15:35:35 | zacharycarter | no |
15:35:39 | zacharycarter | possibly |
15:36:16 | * | Hideki_ joined #nim |
15:37:29 | * | Vladar quit (Quit: Leaving) |
15:41:02 | * | Hideki_ quit (Ping timeout: 260 seconds) |
15:43:27 | * | Senketsu quit (Quit: WeeChat 2.8) |
15:49:15 | * | al1ranger quit (Quit: Leaving) |
15:49:38 | * | narimiran joined #nim |
15:54:58 | * | rockcavera quit (Remote host closed the connection) |
16:01:05 | inv2004 | C: header.h |
16:01:05 | inv2004 | typedef struct{unsigned char g[16];}U; |
16:01:05 | inv2004 | function: K ku(U); |
16:01:05 | inv2004 | Nim: |
16:01:05 | inv2004 | GUID* = array[16, byte] |
16:01:06 | inv2004 | proc ku*(x: GUID): K0 {. importc: "ku", header: "header.h".} |
16:01:08 | inv2004 | trying to call ku(GUID), but compilation fails during compilation into C: |
16:01:10 | inv2004 | incompatible type for argument 1 of ‘ku’ |
16:01:12 | inv2004 | expected ‘U {aka struct <anonymous>}’ but argument is of type ‘NU8 * {aka unsigned char *}’ |
16:01:27 | inv2004 | ogm sorry, did not expect it from copy-paste |
16:02:11 | FromDiscord_ | <Yardanico> @kodkuce I use it with the Nim plugin together and it actually works pretty good. TabNine sometimes really helps when you need you type quite a lot of similar code, or it can predict what you want to write by the previous lines and stuff. I've been using the free version |
16:02:44 | inv2004 | Telegram pointed that nim force for pass the array by pointer, but are there any way to pass it like value? |
16:03:01 | FromDiscord_ | <Rika> inv2004 try `cuchar` instead of `byte` i think |
16:03:14 | FromDiscord_ | <Rika> i have no clue tbh |
16:04:06 | inv2004 | Rika, it did not help |
16:04:48 | FromDiscord_ | <Rika> > i have no clue tbh |
16:08:17 | * | vesper11 quit (Read error: Connection reset by peer) |
16:09:58 | * | vesper11 joined #nim |
16:11:28 | * | Hideki_ joined #nim |
16:21:15 | skrylar[m] | https://media.discordapp.net/attachments/239881657908330499/704004089372999680/unknown.png woo. now to add the prettier linebreaker |
16:29:37 | FromDiscord_ | <dom96> Working on a new leaderboard |
16:29:37 | FromDiscord_ | <dom96> https://cdn.discordapp.com/attachments/371759389889003532/704006282369040471/unknown.png |
16:30:11 | FromDiscord_ | <Rika> io game :ThonkDumb: |
16:30:53 | FromDiscord_ | <dom96> io games are the best 😄 |
16:32:51 | Prestige | dom96: written in nim? |
16:33:59 | * | filcuc joined #nim |
16:34:22 | dom96 | of course |
16:34:43 | * | Hideki_ quit (Ping timeout: 246 seconds) |
16:36:27 | iws | memory access question: I am trying to use SDL2/Audio and in the example the outputbuffer is set up with `var outputBuffer = allocShred(nBytesPerSample)` |
16:36:28 | * | Kaivo quit (Quit: WeeChat 2.8) |
16:37:03 | iws | I have a sequence I want to write inot that shared buffer before handing to the queueAudio() call |
16:37:13 | iws | How could that be done? |
16:38:34 | * | couven92 quit (Ping timeout: 246 seconds) |
16:39:09 | zacharycarter | `addr seq[0]`? |
16:40:45 | * | Vladar joined #nim |
16:42:56 | iws | That would give me the pointer to the value at seq[0] right? But in this case I want to write to some byte x inside the outputBuffer (which is a poitner to something?) |
16:43:19 | iws | https://github.com/nim-lang/sdl2/blob/master/examples/sdl_audiostream.nim Line 111->116 is what I was trying to replicate |
16:43:35 | iws | but with my data coming from a seq[int] instead of a stream |
16:45:14 | zacharycarter | just try what I suggested |
16:45:29 | iws | I did, but I have syntax errors abound |
16:45:44 | zacharycarter | `queueAudio(addr seq[0], len(seq) * sizeof(seq_datatype)) |
16:46:00 | FromDiscord_ | <Recruit_main707> can you edit an openarray? |
16:46:03 | iws | Oh I see! |
16:46:07 | Yardanico | @Recruit yes |
16:46:14 | Yardanico | if you pass it as "var openArray[...]" |
16:46:35 | FromDiscord_ | <Recruit_main707> ok, forgot about var |
16:48:22 | iws | zacharycarter: That works great! Thanks a ton |
16:48:32 | iws | I understand what's going on now, that's much clearer |
16:48:35 | zacharycarter | np |
16:48:58 | iws | the only couple differeces were type issues |
16:49:04 | iws | `device.queueAudio(unsafeAddr wave[0], uint32(len(wave) * sizeof(int)))` wound up with that |
16:50:54 | * | exelotl joined #nim |
16:50:58 | zacharycarter | looks good |
16:52:56 | zacharycarter | I'm running into a EXC_BAD_ACCESS signal here - https://github.com/nim-lang/Nim/blob/devel/lib/system/excpt.nim#L114 - at the end of my thread func's execution |
16:53:11 | zacharycarter | can't figure out why :/ |
16:53:28 | FromDiscord_ | <Varriount> zacharycarter: Are you using arc? |
16:53:38 | zacharycarter | yeah with `--exceptions:setjmp` |
16:54:09 | FromDiscord_ | <Varriount> Are you getting a stack trace? |
16:54:16 | zacharycarter | yeah but it's not very helpful |
16:54:19 | Yardanico | uh guys I'll restart the FromDiscord bot now coz I accidentally made a public paste with the token (so I'll recreate it), expect a few mins of downtime for the FromDiscord here, sorry for the inconvenience |
16:54:44 | * | FromDiscord_ quit (Remote host closed the connection) |
16:55:01 | * | FromDiscord joined #nim |
16:55:01 | FromDiscord | <Varriount> Yardanico: You've doomed us all |
16:55:03 | Yardanico | done |
16:55:38 | FromDiscord | <Varriount> zacharycarter: What's the trace? |
16:56:52 | * | zacharyc1rter joined #nim |
16:57:15 | zacharyc1rter | whoops killed my tmux session I think |
16:59:04 | zacharyc1rter | Varriount: https://play.nim-lang.org/#ix=2jGU - are the top three frames of the stack trace |
16:59:24 | zacharyc1rter | the middle frame is the last line of my thread func |
16:59:43 | zacharyc1rter | where I make a call to another proc that calls `mnunmap` and that call returns with a zero exit code |
17:00:23 | zacharyc1rter | if I remove that call, the program exits after I call joinThreads. If I keep that call present it hangs and this EXC_BAD_ACCESS signal occurs |
17:02:53 | leorize | did you unmap some of Nim's memory? |
17:03:58 | zacharyc1rter | no I unmapped some memory I previous mapped with `mmap` / `mprotect` |
17:05:38 | * | solitudesf quit (Read error: Connection reset by peer) |
17:08:12 | * | solitudesf joined #nim |
17:11:48 | * | arecaceae quit (Remote host closed the connection) |
17:11:58 | * | filcuc quit (Ping timeout: 244 seconds) |
17:12:11 | * | arecaceae joined #nim |
17:16:06 | * | ptdel joined #nim |
17:16:18 | * | solitudesf- joined #nim |
17:16:38 | * | zacharyc1rter quit (Ping timeout: 260 seconds) |
17:18:02 | * | solitudesf quit (Ping timeout: 260 seconds) |
17:18:22 | * | xet7 joined #nim |
17:22:26 | * | someunknownuser joined #nim |
17:24:21 | FromDiscord | <Recruit_main707> can you use "in" with a seq? |
17:24:48 | FromDiscord | <Varriount> Yes |
17:25:01 | FromDiscord | <Recruit_main707> with sequtils right? |
17:25:15 | FromDiscord | <Recruit_main707> oh, it now works |
17:25:30 | FromDiscord | <Recruit_main707> i swear it said it didnt work before :p |
17:26:34 | FromDiscord | <Varriount> zacharycarter: I'd modify the pop safepoint code to print out the value of excHandler.prev |
17:26:46 | FromDiscord | <Varriount> *excHandler |
17:26:57 | FromDiscord | <Rika> @Recruit_main707 no need even, its from `system` |
17:29:11 | * | zacharyc1rter joined #nim |
17:29:17 | zacharyc1rter | hmm this one is pretty easy to reproduce - https://play.nim-lang.org/#ix=2jHa |
17:29:58 | zacharyc1rter | asan is not happy |
17:35:02 | Yardanico | @Recruit_main707 it's easy to check if you can use "in" for some type - search for "contains" for that type |
17:35:23 | Yardanico | if a type has proc contains*(a: MyType): bool defined it'll be used by "in" and "notin" |
17:36:23 | FromDiscord | <Recruit_main707> hmm arc being slower than the default gc.... |
17:36:30 | Yardanico | code? |
17:36:51 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2jHh |
17:36:55 | Yardanico | and it's not always supposed to be faster (at least yet), it's much newer than default GC which has been around for years :P |
17:37:33 | Yardanico | @Recruit it's actually faster for me with --gc:arc lol |
17:37:49 | Yardanico | on the last cpuTime it's 4s for --gc:arc vs 5s for default gc |
17:37:55 | FromDiscord | <Recruit_main707> which leads to the second question, how the hell is python doing that in under 1 second (the biggest array/seq |
17:37:57 | Yardanico | (I'm on latest devel and compiled with -d:danger) |
17:38:10 | Yardanico | can you show python code? |
17:38:43 | * | inv2004 quit (Read error: Connection reset by peer) |
17:39:15 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2jHj <- python code |
17:40:07 | * | azed joined #nim |
17:40:19 | FromDiscord | <Recruit_main707> also, on my machine last cpuTime takes 20 seconds lol |
17:40:38 | FromDiscord | <Recruit_main707> (with arc -d:danger) |
17:42:08 | Yardanico | https://play.nim-lang.org/#ix=2jHk that's faster for me |
17:42:11 | Yardanico | around 25% |
17:42:32 | Yardanico | also cpuTime isn't always what you want |
17:44:36 | leorize[m] | use std/monotimes for benchmark |
17:45:43 | * | noonien joined #nim |
17:45:49 | FromDiscord | <Recruit_main707> but still, nim being that slow compared to python... |
17:46:23 | leorize[m] | give me the benchmark in python and the same in nim :P |
17:46:33 | leorize[m] | and I'll see if I can beat python :P |
17:47:22 | FromDiscord | <Recruit_main707> on the last aray: `hyfix 0.16587833000000005` |
17:47:22 | FromDiscord | <Recruit_main707> i linked hyfix above |
17:47:26 | FromDiscord | <Recruit_main707> array* |
17:47:53 | Yardanico | what about the full code? |
17:47:58 | Yardanico | full python script |
17:48:02 | Yardanico | with actual benchmarking |
17:48:59 | FromDiscord | <Technicae Circuit> What is the fastest C compiler that i should use with Nim? |
17:49:09 | disruptek | gcc |
17:49:17 | leorize | clang is also decent nowadays |
17:49:27 | disruptek | more codegen bugs, though. |
17:49:37 | Yardanico | disruptek: clang is sometimes faster |
17:49:42 | FromDiscord | <Recruit_main707> gcc tends to be faster though iirc |
17:49:54 | Yardanico | clang and gcc are the same for perf most of the time nowadays |
17:50:06 | FromDiscord | <Technicae Circuit> Okay then |
17:50:08 | Yardanico | https://www.phoronix.com/scan.php?page=article&item=gcc-clang-3960x&num=1 |
17:50:09 | FromDiscord | <Technicae Circuit> Thanks |
17:52:40 | FromDiscord | <Recruit_main707> _maybe_ its just my machine being slow |
17:53:04 | FromDiscord | <Recruit_main707> wait a sec |
17:53:06 | Yardanico | well if you share full python script we might help |
17:56:30 | * | martinium joined #nim |
17:56:45 | FromDiscord | <Recruit_main707> leorize: what do you use for benchmarks? |
17:58:39 | leorize | std/monotimes, that's one of the most accurate and low overhead timers in the stdlib |
17:59:49 | FromDiscord | <Recruit_main707> how would i use it? |
18:00:12 | Yardanico | there are docs though? |
18:00:12 | Yardanico | https://nim-lang.org/docs/monotimes.html |
18:00:17 | * | narimiran quit (Quit: leaving) |
18:00:25 | Yardanico | just subtract one getMonoTime() from another |
18:00:38 | FromDiscord | <Recruit_main707> thx |
18:00:43 | * | martinium quit (Changing host) |
18:00:43 | * | martinium joined #nim |
18:11:05 | zacharyc1rter | hmm |
18:11:51 | zacharyc1rter | apparently here - https://github.com/nim-lang/Nim/blob/devel/lib/system/excpt.nim#L113-L114 |
18:11:58 | zacharyc1rter | `excHandler` is undefined |
18:12:33 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/system/excpt.nim#L62 |
18:13:16 | zacharyc1rter | I put a breakpoint in lldb and turned off line mappings and when I try to print `p excHandler__rqLlY5bs9atDw2OXYqJEn` I get - `(lldb) p excHandler__rqLlY5bs9atDw2OXYqJEn5 |
18:13:19 | zacharyc1rter | error: use of undeclared identifier 'excHandler__rqLlY5bs9atDw2OXYqJEn5'` |
18:13:22 | zacharyc1rter | sorry |
18:13:47 | zacharyc1rter | I'll check out the generated C code to see what's wrong |
18:16:05 | zacharyc1rter | yeah, it's not generated hmm |
18:17:27 | * | Hideki_ joined #nim |
18:17:39 | Yardanico | but how did the code compile if it's not there |
18:18:01 | zacharyc1rter | hmm good question |
18:18:07 | zacharyc1rter | maybe it's defined in another source file let me look |
18:21:45 | * | xet7 quit (Ping timeout: 240 seconds) |
18:22:02 | * | Hideki_ quit (Ping timeout: 260 seconds) |
18:22:25 | zacharyc1rter | okay yeah my mistake I think I was just messing up the search string |
18:22:34 | zacharyc1rter | when I dereference it, I get - |
18:22:44 | zacharyc1rter | error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory |
18:24:28 | zacharyc1rter | and if I dereference it and print it's `prev` member property - error: supposed to interpret, but failed: Interpreter couldn't read from memory |
18:25:01 | * | xet7 joined #nim |
18:29:11 | zacharyc1rter | I think those are lldb errors |
18:29:53 | Yardanico | but is that variable even supposed to contain something meaningful if there's no exception in nim code happening currently? |
18:30:18 | zacharyc1rter | well I'm getting an EXC_BAD_ACCESS error in lldb and my program just hangs when I run it |
18:40:15 | * | zacharycarter quit (Ping timeout: 240 seconds) |
18:40:45 | * | zacharyc1rter quit (Ping timeout: 240 seconds) |
18:48:13 | * | rockcavera joined #nim |
19:08:44 | * | hax-scramper quit (Ping timeout: 244 seconds) |
19:09:01 | * | zacharyc1rter joined #nim |
19:09:01 | * | zacharycarter joined #nim |
19:09:08 | * | lritter quit (Quit: Leaving) |
19:11:29 | * | hax-scramper joined #nim |
19:12:41 | FromDiscord | <CoolMan> How do I convert a char to byte or uint8? |
19:13:50 | * | zacharyc1rter quit (Ping timeout: 260 seconds) |
19:13:50 | * | zacharycarter quit (Ping timeout: 260 seconds) |
19:15:29 | Yardanico | uint8(myvar) |
19:16:03 | Yardanico | https://play.nim-lang.org/#ix=2jHW |
19:16:28 | Yardanico | there's also "ord" to get an int value of a character |
19:16:32 | Yardanico | (or an enum value) |
19:17:54 | FromDiscord | <CoolMan> ty |
19:18:22 | * | Anabella joined #nim |
19:21:05 | * | Anabella quit (Client Quit) |
19:28:23 | disruptek | i'm watching my stream from a couple days ago. |
19:29:39 | * | rockcavera quit (Remote host closed the connection) |
19:38:26 | disruptek | pretty damned boring. |
19:45:56 | * | someunknownuser quit (Quit: someunknownuser) |
19:47:00 | FromGitter | <Bennyelg> Dummie Question |
19:47:29 | FromGitter | <Bennyelg> I wrote nim backend but I dont want to use static pages but React |
19:47:46 | * | zacharyc1rter joined #nim |
19:47:46 | * | zacharycarter joined #nim |
19:47:54 | FromGitter | <Bennyelg> How should I do it 👀😅 |
19:48:46 | Yardanico | do an api in nim and make your frontend call that api? |
19:48:51 | Yardanico | I mean rest api or whatever |
19:49:34 | FromGitter | <Bennyelg> Well so I need to understand when I should use the static pages and when is not enough since that what I thought |
19:49:39 | * | Trustable joined #nim |
19:49:49 | FromGitter | <Bennyelg> But I still wany my logic will remain on Nim |
19:49:55 | Yardanico | yes it'll still be in nim |
19:50:19 | Yardanico | if you want to use react you will implement backend api in nim |
19:50:55 | * | rockcavera joined #nim |
19:51:48 | FromGitter | <Bennyelg> Which just return Jsons, but when called Ill cast to the relevant types, do the logic and put it via the dal |
19:52:11 | Yardanico | well that's how it works, and it doesn't really have to be JSON, it can be anything you can decode on the frontend |
19:52:30 | * | zacharyc1rter quit (Ping timeout: 260 seconds) |
19:52:30 | * | zacharycarter quit (Ping timeout: 260 seconds) |
19:52:41 | Yardanico | https://medium.com/free-code-camp/create-a-react-frontend-a-node-express-backend-and-connect-them-together-c5798926047c for example, but replace backend with nim |
19:52:55 | FromGitter | <Bennyelg> Thanks 😊 |
20:00:39 | * | nsf quit (Quit: WeeChat 2.8) |
20:02:53 | * | xcm quit (Remote host closed the connection) |
20:05:17 | * | Faulander quit (Read error: Connection reset by peer) |
20:05:39 | * | xcm joined #nim |
20:12:58 | * | xet7 quit (Quit: Leaving) |
20:19:24 | * | filcuc joined #nim |
20:23:28 | * | rockcavera quit (Remote host closed the connection) |
20:33:45 | FromGitter | <Vindaar> @narimiran why are you forking all those repos? :D |
20:34:04 | Yardanico | for fusion maybe? |
20:34:08 | Yardanico | idk |
20:34:35 | FromGitter | <Vindaar> hmm, maybe |
20:36:07 | FromGitter | <Vindaar> ahh, he's fixing some deprecated things |
20:49:15 | FromDiscord | <Technicae Circuit> How do i make a webserver in Nim? |
20:49:20 | FromDiscord | <Technicae Circuit> Using the C side |
20:51:21 | skrylar[m] | hmm looks like this [expired] adobe patent for line breaking is a lot like the one optimized knuth plass one but with a depth limit stuck to it :curiou |
20:51:24 | skrylar[m] | * :curious: |
20:52:04 | Yardanico | @Technicae you mean the C (default) backend? |
20:52:29 | Yardanico | the easiest choice would be to use jester or asynchttpserver (but it's a bit broken in 1.2.0 but it was fixed and will be in next 1.2 patch) |
20:54:51 | FromDiscord | <Technicae Circuit> You and thanks |
20:55:34 | * | rockcavera joined #nim |
21:11:55 | * | filcuc quit (Ping timeout: 246 seconds) |
21:12:09 | * | zacharycarter joined #nim |
21:12:10 | * | zacharyc1rter joined #nim |
21:16:15 | * | zacharycarter quit (Ping timeout: 240 seconds) |
21:16:45 | * | zacharyc1rter quit (Ping timeout: 240 seconds) |
21:21:10 | * | tane quit (Quit: Leaving) |
21:32:09 | * | filcuc joined #nim |
21:37:56 | * | azed quit (Read error: Connection reset by peer) |
21:39:29 | * | azed joined #nim |
21:40:04 | * | azed quit (Max SendQ exceeded) |
21:40:58 | * | azed joined #nim |
21:47:01 | FromDiscord | <Technicae Circuit> Can Nim be used to make mobile apps? |
21:47:12 | FromDiscord | <Recruit_main707> it can |
21:47:15 | FromDiscord | <Technicae Circuit> If so, is it ideal? |
21:47:28 | FromDiscord | <Recruit_main707> i heard android is a bit painful |
21:47:31 | FromDiscord | <Technicae Circuit> Is it not recommended or something |
21:47:33 | dom96 | ideal for what? |
21:47:44 | FromDiscord | <Technicae Circuit> Ideal for making android apps |
21:47:50 | dom96 | obviously Swift is ideal for iOS and Java/Kotlin is ideal for Android |
21:48:02 | * | azed quit (Quit: WeeChat 2.8) |
21:48:09 | FromDiscord | <Technicae Circuit> ~~I totally am not thinking about making a custom mobile discord client~~ |
21:48:22 | FromDiscord | <Recruit_main707> oof |
21:48:28 | FromDiscord | <Technicae Circuit> I sadly can't figure out Kotlin or Java |
21:48:41 | FromDiscord | <Recruit_main707> you seem to just want to die based on your projects xD |
21:48:47 | FromDiscord | <Technicae Circuit> Hahaha |
21:48:57 | FromDiscord | <Technicae Circuit> https://stallman.org/discord.html |
21:49:05 | dom96 | There are hundreds of resources for how to make Android apps in Java |
21:49:14 | dom96 | *hundreds of thousands probably |
21:49:15 | companion_cube | what's so bad about kotlin? |
21:49:16 | * | Jesin quit (Quit: Leaving) |
21:49:25 | dom96 | For Nim there are like a dozen at most |
21:49:36 | FromDiscord | <Technicae Circuit> I don't want to learn Java, and i like Kotlin as a lang |
21:49:43 | FromDiscord | <Technicae Circuit> But can't figure out the deps system |
21:49:54 | FromDiscord | <Technicae Circuit> I can't figure out maven or gradle with it |
21:49:56 | dom96 | If you can't figure out Java or Kotlin then you will have a very hard time using Nim. |
21:50:03 | FromDiscord | <Generic> I have to correct you obvously Nim is idea for iOS and Nim is idea for Android |
21:50:09 | FromDiscord | <Generic> *ideal |
21:50:12 | FromDiscord | <Technicae Circuit> I am a Python programmer mainly |
21:50:17 | FromDiscord | <Technicae Circuit> Cool |
21:50:31 | FromDiscord | <Technicae Circuit> And Nim seems okay to me so far |
21:50:45 | dom96 | I'm writing a game in Nim targeting mobile and web browsers, and it hasn't been easy :) |
21:50:55 | FromDiscord | <Technicae Circuit> Oof |
21:51:01 | FromDiscord | <Technicae Circuit> Goodluck though! |
21:51:34 | * | Jesin joined #nim |
21:51:50 | dom96 | If you're writing something that needs to target so many platforms then Nim may make sense, otherwise you're far better off sticking with what most use. |
21:51:58 | dom96 | Unless your goal is to learn Nim or just have fun with it |
21:52:21 | FromDiscord | <Technicae Circuit> I want to learn Nim and have fun with it so i guess my use case works |
21:53:24 | FromDiscord | <exelotl> |
21:53:24 | FromDiscord | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/704087763279937657/unknown.png |
21:53:38 | FromDiscord | <exelotl> why am i not surprised that this is the first point lmao |
21:53:44 | dom96 | Then I would suggest something more fun than fighting with Android :P |
21:53:53 | * | xet7 joined #nim |
21:53:59 | FromDiscord | <__ابــــراهــــيــــم__> hello, is there a nice functional programming library i can use with nim? |
21:54:14 | FromDiscord | <Technicae Circuit> Haha |
21:57:19 | * | couven92 joined #nim |
21:58:02 | FromDiscord | <exelotl> @__ابــــراهــــيــــم__ I'm reminded of the itertools port, though I guess it's not exactly functional programming https://github.com/narimiran/itertools |
21:58:20 | FromDiscord | <Varriount> rayman22201: So I looked at Rust's executor's and async, and I think they would work very well for Nim. I'm a bit puzzled by how the passed-in "wait" function works, since it would need some sort of reference to the task or top-level callback, which would create a circular reference ( wait -> task -> async future chain -> ... ) |
21:58:56 | FromDiscord | <__ابــــراهــــيــــم__> @exelotl nice! ill have a look. do you think i can bind this library to nim? https://github.com/Dobiasd/FunctionalPlus/ |
21:59:52 | FromDiscord | <Recruit_main707> why do you want clear c++ code in nim though :P |
22:00:46 | FromDiscord | <__ابــــراهــــيــــم__> sorry, my idea may be weird, i want to learn functional programming and i want to use nim. please no haskel :P |
22:01:33 | FromDiscord | <Elegant Beef> doesnt nim work as a functional language without much fuss? |
22:02:47 | FromDiscord | <__ابــــراهــــيــــم__> i guess it does. i found an example in the nim in action book but there is only one |
22:03:19 | FromDiscord | <__ابــــراهــــيــــم__> list.map() |
22:03:25 | FromDiscord | <Recruit_main707> whats functional programming? |
22:03:42 | FromDiscord | <__ابــــراهــــيــــم__> something about pure functions |
22:03:59 | FromDiscord | <__ابــــراهــــيــــم__> i trying to learn about it |
22:04:03 | companion_cube | what an annoying nickname |
22:04:24 | FromDiscord | <Recruit_main707> lol |
22:04:28 | FromDiscord | <exelotl> @__ابــــراهــــيــــم__ there are more functional helpers in the sequtils module in the standard library: https://nim-lang.org/docs/sequtils.html |
22:04:35 | FromDiscord | <__ابــــراهــــيــــم__> me? :D |
22:04:39 | companion_cube | yeah :p |
22:04:44 | FromDiscord | <__ابــــراهــــيــــم__> lol |
22:04:48 | FromDiscord | <Elegant Beef> no latin characters are horrid |
22:04:52 | companion_cube | can't even write it |
22:04:58 | FromDiscord | <__ابــــراهــــيــــم__> it's arabic |
22:04:59 | FromDiscord | <Recruit_main707> its probably suuuuper long in irc |
22:05:07 | FromDiscord | <__ابــــراهــــيــــم__> omg really |
22:05:20 | FromDiscord | <Elegant Beef> *It's arabic*, yes that's why i said non lating 😄 |
22:05:21 | FromDiscord | <Recruit_main707> `__ابــــراهــــيــــم__`something like this probably |
22:05:23 | FromDiscord | <Elegant Beef> latin* |
22:05:39 | FromDiscord | <irc-friendly-name> this better? |
22:05:42 | FromDiscord | <Elegant Beef> yes |
22:05:46 | FromDiscord | <Recruit_main707> xD |
22:05:52 | FromDiscord | <irc-friendly-name> xD |
22:06:46 | FromDiscord | <irc-friendly-name> @exelotl that's it !!! thank you so much |
22:08:41 | FromDiscord | <exelotl> np :) |
22:08:44 | companion_cube | irc-friendly-name: heh :D |
22:08:59 | companion_cube | I didn't see it as arabic, or rather, there's a ton of `_` in the middle |
22:09:01 | FromDiscord | <exelotl> lol it was pretty epic in my irc client |
22:09:01 | FromDiscord | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/704091691400822784/unknown.png |
22:09:15 | companion_cube | ahahah |
22:09:37 | FromDiscord | <irc-friendly-name> that's a crime in itself xD |
22:09:43 | Araq | hmm I invented a new GC algorithm, now what? who wants my paper? |
22:10:26 | FromDiscord | <irc-friendly-name> is it similar to ARC? |
22:10:43 | companion_cube | Araq: there are conferences about that |
22:11:16 | Araq | irc-friendly-name: it's orthogonal to arc |
22:12:11 | FromDiscord | <irc-friendly-name> i dont understand GCs that deeply but it sounds amazing xD |
22:12:24 | dom96 | Araq, actually, maybe you should do it :) |
22:12:38 | companion_cube | ugh, can't find anything |
22:14:41 | Araq | dom96: do what? |
22:15:03 | dom96 | Araq, write a paper |
22:15:38 | Araq | maybe later, better finish the GC I'm currently writing |
22:17:36 | dom96 | also, your paper would be one of very few that actually have an implementation used in production |
22:17:57 | dom96 | seems like many papers out there propose something and their implementation has bugs |
22:23:08 | Araq | well the algorithm that I found isn't implemented anywhere yet, let alone "used in production" |
22:23:27 | disruptek | sounds fast. |
22:24:04 | companion_cube | a lot of papers have implementations I think |
22:24:13 | dom96 | it will be, I trust in your algorithmic skills |
22:24:15 | companion_cube | e.g. if you look at the java GCs |
22:26:46 | skrylar[m] | https://www.beeflang.org/ wot |
22:27:31 | * | filcuc quit (Ping timeout: 246 seconds) |
22:29:39 | skrylar[m] | well the append allocators are neat. for bolting on variadic bytes in the same alloc as the object |
22:30:50 | * | xcm is now known as Guest93180 |
22:30:50 | * | Guest93180 quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
22:32:29 | skrylar[m] | seems a lot of people are interested in hcr these days |
22:32:38 | * | xcm joined #nim |
22:33:30 | * | solitudesf- quit (Ping timeout: 260 seconds) |
22:34:17 | * | natrys quit (Quit: natrys) |
22:42:27 | Araq | skrylar[m]: yeah it's nicely done |
22:43:34 | FromDiscord | <Elegant Beef> My favourite thing about the beef lang is someone complaining about how the name is unethical |
22:43:59 | FromDiscord | <Elegant Beef> *side note, sorta wish i made it* 😄 |
22:44:41 | FromDiscord | <Elegant Beef> Complaint in question https://github.com/beefytech/Beef/issues/14 |
22:46:34 | krux02 | Interesting, I also just read about the beef language. |
22:47:03 | skrylar[m] | inb4 savage retort that they can just use v if they are vegetarians |
22:48:17 | krux02 | If beef gets a compile time code execution path, they can call the subset of the language that works at compiletime tofu. |
22:48:36 | skrylar[m] | the hcr looks fancy but seems to be only if you use their ide. and append allocators are very yes. otherwise eh.. no macros, otherwise haxe syntax, meh. |
22:48:50 | * | noonien quit (Quit: Connection closed for inactivity) |
22:49:54 | krux02 | It is nice that beef comes with its own editor. |
22:50:06 | krux02 | but also meh, I am so used to emacs now. |
22:50:24 | krux02 | Mixed builds are cool though. |
22:51:07 | Araq | skrylar[m]: you can use an 'UncheckedArray' as the last field in an object to get a bit of the same as "append allocators" |
22:52:35 | skrylar[m] | yea you can also do similar things in C++; the allure is that it otherwise works with a normal constructor syntax |
22:54:43 | Araq | tried to make the compiler's ropes faster with this idea, no performance difference |
22:55:10 | skrylar[m] | eh. ropes aren't worth it. piece tables or death |
22:55:19 | FromDiscord | <Varriount> Araq: Is there any way to allocate an iterator closure's environment on the stack? |
22:55:32 | FromDiscord | <Varriount> Or within another iterator closure? |
22:55:33 | Araq | ergo based on this experiment with a sample size of one it's not important and doesn't need sugar :P |
22:56:15 | Araq | varriount: no |
22:57:21 | * | Vladar quit (Quit: Leaving) |
22:59:53 | Araq | good night |
23:03:06 | Araq | dom96: --gc:orc works with async |
23:04:31 | Araq | and frees memory too, pretty good for a weekend of work |
23:27:57 | FromDiscord | <Skaruts> is there some way to allow optional parameters in a template that takes a block of code, without having to create a bunch of overloads? |
23:28:07 | FromDiscord | <Skaruts> for example, `template(x, y, z:int, a:A, b:B, c:C, code:untyped):untyped` |
23:28:20 | FromDiscord | <Skaruts> I want a, b and c to have default values |
23:28:53 | FromDiscord | <Varriount> Can you have variadic parameters? |
23:29:21 | FromDiscord | <Skaruts> hmm, can you remind me what variadic is? |
23:29:36 | Araq | Skaruts: no but we should have allowed default parameters for templates taking a single last 'untyped' block a long time ago... |
23:29:48 | Araq | please write an RFC |
23:30:02 | FromDiscord | <Varriount> A variable number of arguments. `proc output(x: varargs[string])` |
23:30:51 | FromDiscord | <Skaruts> ah, no, they have different types |
23:33:59 | FromDiscord | <Skaruts> @Araq will do thanks |
23:37:54 | * | zedeus quit (Ping timeout: 256 seconds) |
23:39:02 | FromDiscord | <Skaruts> @Araq, well, I never done an RFC before though, and I have no knowledge of how to implement such a thing, can I leave blank sections in the RFC? |
23:40:19 | FromDiscord | <Skaruts> I also don't have much to say about it, though I have one real use case |
23:44:20 | FromDiscord | <Varriount> Skaruts: Just explain the problem, the proposed solution, pros, cons, alternatives, etc |
23:48:45 | * | Hideki_ joined #nim |
23:51:06 | * | zedeus joined #nim |
23:53:42 | * | krux02_ joined #nim |
23:56:00 | * | krux02 quit (Ping timeout: 244 seconds) |
23:56:57 | * | Hideki_ quit (Remote host closed the connection) |
23:57:14 | * | ftsf joined #nim |