00:05:48 | * | konvertex quit (Ping timeout: 272 seconds) |
00:13:11 | leorize | wdym? |
00:14:22 | * | zacharycarter joined #nim |
00:18:29 | bung | like handle query next 10 items |
00:19:40 | bung | https://redis.io/commands/scan like redis server handle scan |
00:22:05 | * | krux02_ quit (Remote host closed the connection) |
00:25:59 | * | FromDiscord quit (Remote host closed the connection) |
00:26:13 | * | FromDiscord joined #nim |
00:27:16 | * | Guest94415 quit (Ping timeout: 256 seconds) |
00:27:41 | FromDiscord | <Zed> i just realised how lazy i am with development |
00:28:32 | FromDiscord | <Zed> im using bloody make files so i dont have to type nimble build |
00:28:46 | * | GitterIntegratio quit (Ping timeout: 246 seconds) |
00:30:18 | skrylar[m] | nothing wrong with makefiles |
00:30:48 | * | dadada joined #nim |
00:31:10 | * | dadada is now known as Guest77939 |
00:32:29 | zacharycarter | I'm looking at some C++ code which is assigning a value of 0xFF to a unsigned char ptr |
00:33:12 | zacharycarter | well to an unsigned char array I should say |
00:35:09 | zacharycarter | if I run `echo char(0xFF)` in Nim I don't think I get the same octal escape sequence that I do in C |
00:35:21 | zacharycarter | `\377` |
00:35:26 | zacharycarter | so all of this is confusing me |
00:44:51 | * | Tlongir joined #nim |
00:51:57 | * | endragor joined #nim |
00:52:50 | * | lritter quit (Ping timeout: 256 seconds) |
00:53:08 | * | lritter joined #nim |
00:55:02 | * | Guest77939 quit (Ping timeout: 265 seconds) |
00:57:34 | * | Senny quit (Ping timeout: 258 seconds) |
01:00:46 | * | dadada joined #nim |
01:01:13 | * | dadada is now known as Guest88345 |
01:06:44 | FromDiscord | <codic> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/715370437399281715 |
01:12:05 | FromDiscord | <flywind> You should import `strformat` modules |
01:12:07 | FromDiscord | <Elegant Beef> You dont have strformat |
01:12:08 | FromDiscord | <Elegant Beef> Yea |
01:12:42 | FromDiscord | <codic> Oh |
01:12:43 | FromDiscord | <codic> I'm stupid |
01:12:46 | * | monokrom quit (Remote host closed the connection) |
01:12:54 | FromDiscord | <codic> I confused strformat and strutils |
01:12:57 | FromDiscord | <codic> 🤦 |
01:18:18 | FromDiscord | <codic> How do I change active dir? in nim |
01:18:33 | FromDiscord | <Elegant Beef> setCurrentDir |
01:18:37 | FromDiscord | <Elegant Beef> in the OS module iirc |
01:18:39 | FromDiscord | <codic> o, thanks |
01:19:23 | FromDiscord | <codic> is there a way to get the aboslute path to a file? |
01:19:49 | FromDiscord | <codic> nvm dont need to |
01:20:11 | * | chemist69 quit (Ping timeout: 272 seconds) |
01:20:39 | bung | AbsoluteFilehttps://nim-lang.org/docs/os.html#absolutePath%2Cstring |
01:21:10 | FromDiscord | <codic> thanks might be useful late |
01:21:12 | FromDiscord | <codic> (edit) 'late' => 'later' |
01:21:56 | * | chemist69 joined #nim |
01:22:58 | * | endragor quit (Remote host closed the connection) |
01:23:45 | * | endragor joined #nim |
01:24:08 | FromDiscord | <codic> how come when i use a name with dashes, like soldeb-nim, i get invalid module name? |
01:24:58 | * | Guest88345 quit (Ping timeout: 272 seconds) |
01:27:50 | FromDiscord | <codic> *soldeb-cli |
01:27:56 | FromDiscord | <codic> the file name is soldeb-cli.nim |
01:27:58 | bung | you cant import by literal |
01:28:10 | disruptek | sure you can. |
01:28:15 | FromDiscord | <codic> what do you mean? |
01:28:22 | disruptek | import "goat-fucker.nim" |
01:28:57 | FromDiscord | <codic> i'm not importing the file |
01:29:02 | FromDiscord | <codic> not making it a mdoule at all |
01:29:07 | disruptek | of course not. |
01:29:10 | FromDiscord | <codic> No idea why the file name is affecting the compiltation |
01:29:13 | FromDiscord | <codic> *compilation |
01:29:14 | disruptek | soldeb-cli is not a valid symbol. |
01:29:26 | disruptek | nim no longer supports kebab style. |
01:29:49 | FromDiscord | <codic> frick |
01:29:58 | FromDiscord | <codic> I'll use soldebCli |
01:30:09 | disruptek | you can use an underscore. |
01:30:45 | * | dadada__ joined #nim |
01:34:25 | FromDiscord | <codic> nah. |
01:34:28 | * | dddddd quit (Ping timeout: 272 seconds) |
01:34:30 | FromDiscord | <codic> i prefer camel case |
01:35:12 | disruptek | aight boss. |
01:35:43 | FromDiscord | <codic> :p↵I was trying to create and cd to a temporary directory:↵`` |
01:35:49 | FromDiscord | <codic> sent a code paste, see http://ix.io/2nxX |
01:35:55 | FromDiscord | <codic> for some reason it gives me Error: unhandled exception: Not a directory |
01:36:07 | FromDiscord | <codic> even tho tempDir is a string and that directory is created |
01:38:54 | FromDiscord | <Elegant Beef> nim has procs to make folders |
01:39:20 | FromDiscord | <Elegant Beef> Just make a directory then dispose of it when done |
01:40:18 | FromDiscord | <Elegant Beef> tempDir needs to include the file name |
01:40:22 | FromDiscord | <Elegant Beef> when copying |
01:43:21 | * | nphg joined #nim |
01:43:31 | FromDiscord | <Elegant Beef> Atleast i assume so considering the doccumentation saying it replaces it if a file is there |
01:44:55 | * | nphg1 quit (Ping timeout: 260 seconds) |
01:48:11 | * | fredrikhr quit (Ping timeout: 260 seconds) |
01:54:20 | * | dadada__ quit (Ping timeout: 246 seconds) |
02:00:49 | * | dadada joined #nim |
02:01:13 | * | dadada is now known as Guest13239 |
02:18:15 | * | endragor quit (Remote host closed the connection) |
02:22:06 | * | endragor joined #nim |
02:24:26 | * | Guest13239 quit (Ping timeout: 246 seconds) |
02:26:16 | * | cgfuh quit (Ping timeout: 256 seconds) |
02:27:50 | skrylar[m] | disruptek: kebabs are nice though :( |
02:28:04 | * | skrylar[m] has annoyances that this-thing.nim doesn't work |
02:29:13 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:29:47 | FromDiscord | <Technisha Circuit> Is it possible to import a directory without a .nimble file? |
02:30:51 | * | dadada__ joined #nim |
02:31:07 | * | muffindrake joined #nim |
02:32:16 | leorize | yes |
02:32:19 | leorize | -p: |
02:32:29 | FromDiscord | <codic> > nim has procs to make folders |
02:32:34 | skrylar[m] | nim c -p:../something thingdo |
02:32:36 | FromDiscord | <codic> I want a randomly created one like mktemp |
02:32:42 | skrylar[m] | preferably put the -p's in nim.cfg |
02:32:57 | leorize | skrylar[m]: well we can make it work, but it's not a high priority |
02:34:23 | FromDiscord | <codic> > tempDir needs to include the file name↵> when copying↵ah |
02:34:34 | FromDiscord | <codic> lemme try |
02:34:43 | leorize | codic: https://nim-lang.org/docs/posix_utils.html#mkdtemp%2Cstring |
02:35:15 | FromDiscord | <codic> oh. |
02:35:24 | FromDiscord | <codic> thanks |
02:39:49 | * | gangstacat quit (Quit: Ĝis!) |
02:46:58 | FromDiscord | <codic> it's actually finally fricking working |
02:48:32 | * | gangstacat joined #nim |
02:53:55 | * | chemist69 quit (Ping timeout: 272 seconds) |
02:54:16 | * | dadada__ quit (Ping timeout: 246 seconds) |
02:54:24 | * | chemist69 joined #nim |
02:59:43 | skrylar[m] | \o/ |
03:00:55 | * | dadada joined #nim |
03:01:18 | * | dadada is now known as Guest88684 |
03:17:31 | * | Tongir joined #nim |
03:19:44 | * | Tlongir quit (Ping timeout: 246 seconds) |
03:20:20 | skrylar[m] | suppose should grind away a bit more on the engine later |
03:21:27 | skrylar[m] | do have a minor curiosity about revisitng the old bmessage concept; which is basically just a hash map jammed in to a buffer, but the lasti mpl of that was messy |
03:22:36 | * | justsomeguy joined #nim |
03:23:43 | skrylar[m] | sadly event pump code is not glamorous |
03:23:47 | skrylar[m] | nor are canvasses :/ |
03:24:46 | * | Guest88684 quit (Ping timeout: 258 seconds) |
03:27:15 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:30:48 | * | dadada__ joined #nim |
03:37:25 | * | justsomeguy quit () |
03:49:38 | * | rockcavera quit (Remote host closed the connection) |
03:54:50 | * | dadada__ quit (Ping timeout: 265 seconds) |
04:00:49 | * | dadada joined #nim |
04:01:14 | * | dadada is now known as Guest9108 |
04:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:37 | * | supakeen joined #nim |
04:07:32 | * | Brandon__ joined #nim |
04:10:47 | * | bebarker quit (Ping timeout: 265 seconds) |
04:16:12 | * | mwbrown quit (Ping timeout: 256 seconds) |
04:18:50 | * | mwbrown joined #nim |
04:24:29 | * | Guest9108 quit (Ping timeout: 246 seconds) |
04:29:33 | * | lritter quit (Quit: Leaving) |
04:30:51 | * | dadada__ joined #nim |
04:54:28 | * | dadada__ quit (Ping timeout: 258 seconds) |
05:00:56 | * | dadada joined #nim |
05:01:19 | * | dadada is now known as Guest44678 |
05:15:04 | * | Tongir is now known as Maxwell_Pound |
05:33:16 | martinium | anyone know why a running program would go to sleep while writing? |
05:33:32 | martinium | after writing a boatload my nim program just pauses |
05:33:51 | martinium | gnome resources window for process gives status as sleeping |
05:39:48 | livcd | can you share your code? |
05:47:34 | martinium | livcd, https://gist.github.com/martinium/e11f0fd1299675e5c7a0d729f3d342dc |
05:48:28 | martinium | just added a poll of 5000 |
05:48:32 | martinium | got this error |
05:48:34 | martinium | Error: unhandled exception: Connection timed out [OSError] |
05:54:38 | martinium | took a few weeks break for this error |
05:54:46 | martinium | came back and still kicking my butt |
05:54:49 | martinium | :-p |
05:55:12 | martinium | few weeks off looking at the code I meant* |
05:57:33 | martinium | if I comment out client.close() in req proc I get this error after a little while |
05:57:35 | martinium | Error: unhandled exception: No handles or timers registered in dispatcher. [ValueError] |
06:06:09 | * | solitudesf joined #nim |
06:07:23 | * | leorize quit (Ping timeout: 240 seconds) |
06:08:15 | * | leorize joined #nim |
06:19:00 | * | zedeus quit (Quit: zedeus) |
06:21:48 | FromDiscord | <Zed> can you discard a variable? would this work? ↵`let temp: int = 10`↵ `discard temp`↵`let temp: string = "worked?"` |
06:22:54 | Prestige | You can always try at https://play.nim-lang.org/ btw |
06:23:21 | Prestige | But no, you cannot redefine it |
06:23:25 | FromDiscord | <Zed> i always forget about that, bookmarked it now |
06:23:40 | Prestige | discard is basically to acknowledge that you are not doing something with a proc's return value |
06:24:01 | FromDiscord | <Zed> will nim be getting an official repl anytime soon? |
06:24:18 | Prestige | I think I heard of a project that was working on it but I can't recall rn |
06:25:18 | FromDiscord | <Zed> is there any way you can redefine a variable? |
06:25:41 | Prestige | Not to change it's type, but to change value declare it as `var x = something` |
06:25:48 | Prestige | its* |
06:26:25 | Prestige | Do you have an example of something you're wanting to do though? Maybe I can offer a solution |
06:27:06 | Prestige | Also this is what I meant, if I wasn't clear: https://play.nim-lang.org/#ix=2nyr |
06:28:25 | * | tdc joined #nim |
06:28:55 | FromDiscord | <Zed> im just thinking ahead in time with temp variables, |
06:29:35 | Prestige | Can't really say without looking at the code, but maybe consider generics? |
06:30:14 | FromDiscord | <Zed> good idea |
06:30:30 | FromDiscord | <Zed> That would actually work really well |
06:45:08 | FromGitter | <sheerluck> https://i.imgur.com/sfRmYVX.png |
06:45:48 | Prestige | lmao the dino sweater |
06:49:59 | skrylar[m] | its really like that though ._. |
06:50:24 | skrylar[m] | i just noticed the other day vscode doesn't even have jump to bookmark |
06:50:42 | skrylar[m] | usually ctrl-f2 and f2 are bound to putting and jumping between those |
06:58:23 | FromDiscord | <Zed> How do generics work in nim? ↵Looking in the manual at the generics i see a parameter with a generic type just has a `T` but when trying it myself it im getting an undeclared identifier?↵https://play.nim-lang.org/#ix=2nyr |
06:58:44 | FromDiscord | <Zed> *https://play.nim-lang.org/#ix=2nyr |
06:59:05 | FromDiscord | <Zed> my playgrounds messed up |
06:59:37 | FromDiscord | <Zed> https://play.nim-lang.org/#ix=2nyv |
06:59:49 | FromDiscord | <Zed> That's the right one |
07:01:09 | bung | generic type is like cpp's |
07:01:16 | Yardanico | @Zed that's not how you create a generic |
07:01:20 | Yardanico | and no, generics don't exist at runtime |
07:01:24 | Yardanico | a variable can only have _one_ type |
07:02:11 | FromDiscord | <Elegant Beef> The closest you can get to what you're attempting is an object variant afaik |
07:02:18 | Yardanico | https://nim-lang.org/docs/manual.html#generics |
07:02:21 | bung | proc name[GENERICT](a:GENERICT) |
07:02:29 | bung | that's how it works |
07:02:41 | Yardanico | yeah check the link in the manual |
07:05:18 | * | ftsf_ joined #nim |
07:06:38 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2nyw |
07:06:42 | FromDiscord | <Elegant Beef> Something like that |
07:06:52 | FromDiscord | <Elegant Beef> You'd ideally make constructors for each variant type |
07:06:59 | FromDiscord | <Elegant Beef> To reduce having to specify the kinds |
07:07:14 | * | ftsf quit (Ping timeout: 260 seconds) |
07:07:50 | FromDiscord | <Zed> ok, ill have to play around with it then |
07:08:11 | bung | when document it or decalre it you will see T,P,E... when use it you pass the actually type to it |
07:08:42 | FromDiscord | <Elegant Beef> Generics basically just state that you accept specific types, or all types |
07:08:52 | FromDiscord | <Elegant Beef> sequences for instance |
07:09:33 | FromDiscord | <Elegant Beef> Nim is statically typed so we can do the silly python stuff here |
07:09:39 | FromDiscord | <Elegant Beef> (edit) 'can' => 'cany' |
07:09:40 | * | CcxWrk quit (Ping timeout: 256 seconds) |
07:09:42 | FromDiscord | <Elegant Beef> (edit) 'cany' => 'cant' |
07:09:47 | FromDiscord | <Elegant Beef> Rip IRC |
07:09:52 | Yardanico | why? |
07:10:00 | FromDiscord | <Elegant Beef> I edited it twice |
07:10:01 | Yardanico | so? |
07:10:10 | Yardanico | we have ircord for more than a week now |
07:10:29 | FromDiscord | <Elegant Beef> I mean rip as in i just spammed it with me modifing the message |
07:11:54 | * | PMunch joined #nim |
07:11:59 | FromDiscord | <Elegant Beef> yard you might be a little self conscious of your bot 😛 |
07:13:25 | Yardanico | nah |
07:13:39 | FromGitter | <sheerluck> Bot can set up a 20 sec timer before sending message. So when 'can' => 'cany' timers just resets. And after 'cany' => 'cant' too. And finally, when for 20 sec nothing changes, bot sends msg |
07:14:13 | Yardanico | that's really a long amount |
07:14:18 | Yardanico | it won't be a "real time chat" then |
07:14:53 | FromDiscord | <Rika> Anything longer that 1 is too long, and no one edits in a second |
07:15:03 | Yardanico | except me in telegram |
07:17:28 | * | idf joined #nim |
07:17:39 | FromGitter | <sheerluck> It will be really real time chat for almost all of us, except for those with fragile ego. |
07:17:56 | Yardanico | we don't know if a user will send edits or not |
07:17:58 | Yardanico | that's the thing |
07:18:02 | skrylar[m] | real time memes |
07:19:50 | Yardanico | 930 members in the discord server and less than 25 of them active on a regular basis :D |
07:23:19 | skrylar[m] | discord is awful imho |
07:23:31 | Yardanico | well yeah disallowing third-party clients in ToS kinda sucks |
07:23:44 | skrylar[m] | was talking to someone earlier about how one of the biggest lies discord has is that you are member of a server |
07:24:28 | * | oprypin quit (Quit: Bye) |
07:24:37 | skrylar[m] | really what happens is people immediately turn off notifications, bury the server somewhere in their list, and probably never join the voice chat. so you have a big list of names, mostly meaningless, and people aren't integrated to a community at all. and since the servers are free* everyone and their dog has one, which further diasporas the hell out of everyone |
07:25:02 | skrylar[m] | contrast to teamspeak/mumble where you get one, and you occupy a slot being there, so if someone is around they are here to be around with other people |
07:26:10 | voltist | Anybody know how I could convert an arraymancer tensor of type int16 to uint8? |
07:27:47 | skrylar[m] | Yardanico: those have been banned in every tos for every chat network, they just don't tend to bother to enforce it |
07:27:58 | Zevv | PMunch: ping |
07:27:59 | Yardanico | skrylar[m]: that's not true |
07:28:06 | * | Trustable joined #nim |
07:28:07 | PMunch | Zevv, pong |
07:28:12 | Yardanico | does telegram ban third party clients? not at all |
07:28:25 | Zevv | PMunch: I got my cooked example ready for you, check https://github.com/zevv/nimcoro/blob/master/main.nim |
07:28:46 | Zevv | lightweight coroutine based async I/O from scratch |
07:28:52 | Prestige | Sup PMunch |
07:29:03 | PMunch | Prestige, just workin' |
07:29:34 | PMunch | Zevv, "jiield" :P |
07:31:50 | Zevv | yeah, tell me about it |
07:32:01 | Zevv | I started with `yeild` but that made my eyes bleed |
07:32:28 | PMunch | Hahaha, yeah that would just be even more confusing |
07:32:29 | Prestige | I need to recruit you to work on nimdow with me PMunch lol :P If only I could afford you |
07:32:47 | * | oprypin joined #nim |
07:33:06 | Zevv | anyway, hope that this answers your questions, fwiw :) |
07:34:37 | skrylar[m] | Yardanico: icq somehow still exists. pidgin still supports it |
07:34:54 | skrylar[m] | there is also a discord plug for pidgin |
07:35:00 | PMunch | Zevv, I think so. So essentially those jield would only do async stuff when in an async context? So when you run newCoro it creates this context if it doesn't exist? |
07:35:39 | Zevv | right. In non-coro context this yield does not make sense and will throw on you |
07:35:59 | Zevv | but the nice thing is that coroutines are not "special" otherwise. No magic, no pragmas, no iterators, no macros |
07:36:23 | PMunch | Prestige, haha I'd love to be able to work in Nim again full-time (although I mostly work in Nim already). |
07:36:38 | Zevv | it's just a common proc. You can pass the resumer around to anywhere and yield away. |
07:37:08 | Zevv | I first was sad that I could not make yield/resume pass data like the Lua coros because of typing, but in the end that's no problem, since most of that can be done with closures or shared data anyway |
07:37:29 | PMunch | Oh yeah, what is the resumer? |
07:37:46 | Prestige | PMunch: I'm curious if I should just read the xlib manual to figure out what's going on with this one particular case I'm running into. Been tempted to clone another window manager to figure out what the deal is |
07:38:09 | PMunch | Which case? |
07:38:15 | Prestige | Although a bug bounty might not be a bad option |
07:38:29 | Prestige | there is a wine application that should be floating but I'm not detecting it as such |
07:38:29 | PMunch | Looking at another window manager might be a massive pain.. |
07:38:36 | PMunch | Hmm |
07:38:38 | Zevv | PMunch: the resumer is a tiny proc that has the coro as a closure and does co.resume() |
07:38:46 | PMunch | Prestige, a specific one? |
07:39:01 | Zevv | so you don't need to know the `co` itself, as it is nicely tucked away in the closure |
07:39:03 | PMunch | Or just any Wine application? |
07:39:04 | Prestige | I've only tried one, LoL (the game) |
07:39:27 | Prestige | none of my cases to detect if something should be floating has caught it |
07:39:30 | FromDiscord | <Elegant Beef> Prestiege do you know that when a window wants to be mapped if the min size == max size it wants to be floating? |
07:39:41 | Prestige | and since I don't know what I'm looking for, it's been difficult |
07:39:52 | Prestige | oh that's interesting Beef |
07:40:23 | FromDiscord | <Elegant Beef> It worked for a ton of windows like battle.net and winetray |
07:40:31 | FromDiscord | <Elegant Beef> and vscode save dialogs |
07:40:53 | Prestige | You always brighten my day, I will look into that |
07:41:03 | FromDiscord | <Elegant Beef> You must be a gloomy individual 😄 |
07:41:35 | PMunch | Zevv, hmm |
07:42:23 | Prestige | Beef: I've been trying to figure this out for like 2 days so any news is good news haha. |
07:42:57 | PMunch | Zevv, I think I need to implement my idea and see if it works out |
07:43:11 | PMunch | It would have a lot of the same benefits as your solution here |
07:43:26 | PMunch | @Elegant Beef, you're also writing a WM? |
07:43:30 | FromDiscord | <Elegant Beef> I was |
07:43:36 | FromDiscord | <Elegant Beef> I've given up since i despise xlib |
07:44:18 | PMunch | Haha, yeah it's not great.. |
07:44:22 | FromDiscord | <Elegant Beef> https://streamable.com/jcli03 gave up around here |
07:44:26 | PMunch | Maybe xcb would be better? |
07:44:37 | FromDiscord | <Elegant Beef> Nah still dealing with atoms |
07:44:41 | Prestige | I wish I had started with xcb |
07:44:45 | FromDiscord | <Elegant Beef> Those atoms are fucking atrocious |
07:45:32 | PMunch | What? |
07:45:36 | PMunch | I kinda like atoms :P |
07:45:43 | Zevv | PMunch: what would your idea look like? |
07:45:43 | FromDiscord | <Elegant Beef> I dislike them so much |
07:46:14 | Prestige | Oh nice vid Beef, that looks good |
07:47:29 | FromDiscord | <Elegant Beef> It's functional, but some nuisances |
07:48:13 | Prestige | I haven't ran into any bugs with nimdow except these windows not floating |
07:48:58 | FromDiscord | <Elegant Beef> I dislike xlib a lot cause im not one for reading documentation, im one for aimlessly guessing 😄 |
07:49:37 | PMunch | Zevv, well the async procedures would return a Future, this Future holds the return type and a closure iterator. The closure iterator yields other closure iterators. When you get a Future you can "waitFor" it which would set up a one-time dispatcher and run through until it got a return value. Or you could "await" it which would require an async context and add it to that queue. |
07:49:41 | PMunch | Or something like that |
07:49:52 | FromDiscord | <Elegant Beef> also why `jield`? |
07:50:05 | FromDiscord | <Elegant Beef> Wouldnt `delay` or `wait` be acceptable? |
07:51:14 | FromGitter | <sheerluck> Anti-Python stance |
07:51:26 | FromDiscord | <Elegant Beef> huh? |
07:53:21 | FromGitter | <sheerluck> yield made his eyes bleed |
07:53:36 | Zevv | PMunch, hmm |
07:53:46 | Prestige | @Elegant Beef You were correct! that fixed the issue I've been bug hunting for like 20 hours :) Thanks! |
07:53:47 | PMunch | sheerluck, yeild made his eyes bleed :P |
07:53:49 | PMunch | Not yield |
07:53:56 | FromDiscord | <Elegant Beef> Cheers |
07:54:23 | PMunch | Prestige, @Elegant Beef, I'll just quickly make a note of that for when I run into this issue myself :P |
07:54:29 | Zevv | `yield` is a keyword, so I can't use that |
07:54:50 | FromDiscord | <Elegant Beef> is `delay` or `wait` not viable? |
07:54:58 | FromGitter | <sheerluck> my english is so bad. `yeild` and `yield` are same for me :( |
07:55:02 | Prestige | I'm stupid happy right now |
07:55:09 | * | Guest44678 quit (Ping timeout: 256 seconds) |
07:55:13 | FromDiscord | <Elegant Beef> Well you were stupid sad before eh? |
07:55:16 | FromDiscord | <Elegant Beef> 😛 |
07:55:20 | PMunch | I agree though that "delay", "wait", "relinquish" or something else would probably be better |
07:55:24 | Prestige | Beef since I couldn't figure it out, I was planning on reading the entire xlib manual tomorrow lol. |
07:55:45 | PMunch | sheerluck, took me a couple times reading that sentence until I noticed it myself :P |
07:55:51 | FromDiscord | <Elegant Beef> Hey maybe if we fused like DBZ characters we'd turn into one competent xlib programmer |
07:56:00 | Prestige | lmao |
07:56:10 | PMunch | @Elegant Beef, do you have a reference for this, or is it just something you figured out by accident? |
07:56:26 | FromDiscord | <Elegant Beef> Think there is a stackoverflow or something somewhere that explained that |
07:57:31 | Zevv | Elegant Beef: sure, but it's just called 'yield' normally. Plus, I'd like to stay close to the Lua interface, because I think the Lua guys can think pretty well and generally make good interfaces. |
07:57:34 | Prestige | We should really start documenting these weird cases we find |
07:57:45 | FromDiscord | <Elegant Beef> We should |
07:58:09 | FromDiscord | <Elegant Beef> Or we should not give any aid and just say "Go use wayland" |
07:58:10 | FromDiscord | <Elegant Beef> 😄 |
07:58:48 | Prestige | Lol |
07:59:42 | PMunch | Hmm, I can't find anything on minsize == maxsize: floating |
08:00:50 | * | Vladar joined #nim |
08:00:55 | * | dadada joined #nim |
08:01:18 | * | dadada is now known as Guest25737 |
08:01:20 | FromDiscord | <Elegant Beef> Yea idk |
08:02:02 | Prestige | worked for me, lol |
08:03:16 | PMunch | I should get back to working on PiMo |
08:03:33 | PMunch | Tried a couple of weeks ago but ended up doing NimScript instead :P |
08:03:37 | FromDiscord | <Elegant Beef> Nah you should get to the the article! |
08:03:52 | PMunch | That actually came about from my work on PiMo |
08:04:00 | FromDiscord | <Elegant Beef> Ah |
08:04:13 | FromDiscord | <Elegant Beef> You wanted to do the same as i did with nimscript for configuration? |
08:04:15 | PMunch | To do configuration and keyboard events and such |
08:04:21 | PMunch | Yup |
08:04:24 | Prestige | That would be so cool |
08:04:34 | FromDiscord | <Elegant Beef> I wanted to use nimscript to code imgui widgets for my status bar |
08:04:36 | PMunch | Wait, you were also using NimScript for configuration? |
08:04:40 | FromDiscord | <Elegant Beef> No |
08:04:42 | FromDiscord | <Elegant Beef> I wanted to |
08:04:45 | PMunch | Ah |
08:06:03 | FromDiscord | <Elegant Beef> But I also did move to regolith, and like the experience here so |
08:06:13 | PMunch | regolith? |
08:06:22 | FromDiscord | <Elegant Beef> Presetup i3-gaps on a ubuntu distro |
08:06:36 | FromDiscord | <Elegant Beef> Uses rofication |
08:06:43 | FromDiscord | <Elegant Beef> And has nice themes |
08:07:12 | PMunch | Huh, interesting |
08:07:33 | FromDiscord | <Elegant Beef> One of the nice parts-↵`Command 'snap' not found, but can be installed with:` |
08:07:40 | PMunch | That's actually one of the reasons I switched from Ubuntu to Manjaro back in the day. It was one of the few distros that had an i3 flavour |
08:07:51 | PMunch | rofication? |
08:08:03 | FromDiscord | <Elegant Beef> A notification system that uses rofi to draw |
08:08:15 | FromDiscord | <Elegant Beef> https://github.com/DaveDavenport/Rofication |
08:08:26 | FromDiscord | <Elegant Beef> It's non intrusive |
08:08:40 | FromDiscord | <Elegant Beef> Displays a bell on the system tray, and you open notifications to read them all |
08:10:47 | PMunch | Hmm, that is interesting |
08:14:30 | FromDiscord | <Elegant Beef> Yea i was using ubuntu with a manually setup i3 but regolith ships with pretty sane defaults, and a easily customized settings |
08:14:48 | FromDiscord | <Elegant Beef> (edit) removed 'a' |
08:15:05 | FromDiscord | <jasonfi> I posted an article regarding Nim on hacker news that's generating some conversation: https://news.ycombinator.com/item?id=23333955#23334482 |
08:15:17 | * | Vladar quit (Remote host closed the connection) |
08:15:23 | FromDiscord | <jasonfi> not sure if anyone wants to chime in regarding some of the questions/opinions |
08:15:31 | FromDiscord | <Elegant Beef> 3 is wrong |
08:15:39 | * | Vladar joined #nim |
08:15:48 | FromDiscord | <Elegant Beef> Strong type is != static type |
08:16:58 | FromDiscord | <Elegant Beef> Should work |
08:16:59 | FromDiscord | <Elegant Beef> sent a code paste, see http://ix.io/2nyP |
08:20:42 | PMunch | I mean Nim is both strong and static |
08:20:46 | FromDiscord | <Elegant Beef> Yea |
08:20:52 | FromDiscord | <Elegant Beef> But strong is not the same as static |
08:20:59 | FromDiscord | <Elegant Beef> Static is what they meant to imply |
08:21:12 | FromDiscord | <Elegant Beef> (edit) 'imply' => 'say' |
08:21:35 | FromDiscord | <Elegant Beef> Atleast in this sentence it seems like static is what they're describing↵> Nim has a strong type system, unlike Python where types can only be specified optionally. A typed language gives better information to the compiler for better optimizations. |
08:21:37 | FromDiscord | <Rika> wish we had better error messages 😛 |
08:21:41 | PMunch | 4.3, I don't think the error messages are that bad any longer |
08:21:49 | FromDiscord | <Elegant Beef> Yea i was going to say |
08:21:52 | FromDiscord | <Rika> i still think they are |
08:21:53 | PMunch | But that might just be because I got used to how bad they used to be :P |
08:21:55 | FromDiscord | <Elegant Beef> They're pretty on the point most times |
08:22:02 | FromDiscord | <Rika> not all of them are |
08:22:24 | PMunch | I mostly find weird error messages when I'm doing weird stuff with meta-programming |
08:22:25 | FromDiscord | <Elegant Beef> I'd say a disadvantage is the tooling is subpar at times |
08:22:29 | PMunch | And that's only fair :P |
08:22:31 | FromDiscord | <Elegant Beef> Same |
08:22:49 | FromDiscord | <Elegant Beef> Nim suggest occasionally doesnt want to behave properly |
08:22:52 | FromDiscord | <Elegant Beef> Which is always nice |
08:23:26 | FromDiscord | <Elegant Beef> Look at the errors of vscode has 0, meanwhile nim suggest is saying `fmt cannot be instantiate here` |
08:23:41 | FromDiscord | <Elegant Beef> Compiles and runs, starring at the red line, and questioning life |
08:24:52 | * | Guest25737 quit (Ping timeout: 272 seconds) |
08:25:16 | * | clemens3 quit (Read error: Connection reset by peer) |
08:29:39 | PMunch | Yeah.. That one is strange.. |
08:30:30 | PMunch | I've found that it's sometimes because nimsuggest (or in my case nimlsp) was pointed at the wrong version of the stdlib, or was compiled with a different version of Nim (because I've choosenim-ed to a different version which doesn't switch nimlsp). |
08:30:54 | * | dadada__ joined #nim |
08:31:40 | FromDiscord | <Elegant Beef> Well it works but then occasionally stops working |
08:32:50 | bung | I thought nimlsp might have master child processes |
08:33:17 | bung | make it not easyly break down. |
08:34:45 | bung | in vscode crash multiple times in minutes will not restart it again |
08:35:16 | FromGitter | <sheerluck> Sorry for offtopic, I am too afraid to ask in Zig chat. I have LLVM built with 4 LLVM_TARGETS out of 18. My question is why Zig makes me build all TARGETS, I don't want to rebuild llvm with all TARGETS enabled. My hypothesis is Zig wants me to stay with Nim. How sweet of him. |
08:35:49 | PMunch | bung, this was a deliberate design decision |
08:37:45 | bung | after I fix the path issue, the error mostly related to nimsuggest that point to nim vm that I cant fix . |
08:37:50 | PMunch | The LSP clients should supervise the process already, and has a closer link to the user. NimLSP could supervise nimsuggest, but then no-one would fix the bugs that makes nimsuggest crash, because no-one would notice them. And what if the supervisor failed? Should we have a supervisor supervisor? |
08:38:44 | FromDiscord | <Elegant Beef> Get a supervisor supervisor |
08:39:11 | bung | that might need a compile flag |
08:39:17 | PMunch | But then who supervises that? |
08:39:21 | FromDiscord | <Elegant Beef> Each supervisor has to exponentially reduce the chance of a fatal crash |
08:39:29 | PMunch | It's supervisors all the way down! |
08:39:53 | bung | every one can see the error , see it crashs |
08:40:16 | bung | only few people can fix it |
08:41:40 | bung | and it also not easy for user properly reporting such a problem, not easy reproduce... |
08:44:54 | PMunch | https://github.com/PMunch/nimlsp/issues/50 |
08:44:55 | disbot | ➥ Add better support for NimScript files |
08:45:35 | PMunch | bung, still it's better that the issues are detected at all than hidden from anyone by a supervisor that might end up not doing the right thing anyways. |
08:49:08 | bung | ok, got your point, may need times make it more stable. |
08:49:51 | * | gangstacat quit (Ping timeout: 272 seconds) |
08:50:32 | * | gangstacat joined #nim |
08:56:52 | * | neceve joined #nim |
08:56:57 | PMunch | Prestige, Steam is a hot mess under i3 by the way |
08:57:10 | Prestige | Oh really? Hmm |
08:57:15 | Prestige | Maybe I'll try out steam... |
08:58:56 | Prestige | hm it has some issues I'll have to look into.. |
09:01:04 | Prestige | wow PMunch it's actually a mess lol. How strange |
09:01:20 | PMunch | Yup |
09:01:23 | PMunch | Super annoying |
09:01:35 | bung | what's find index of element in seq , havn't see it list in doc |
09:01:59 | PMunch | For example right now I'm moving a folder between two libraries, and that window insists on showing up on every workspace.. |
09:02:34 | Prestige | I think it's just mySeq.find(element) |
09:02:57 | Prestige | PMunch: if I maximize steam, sometimes it just starts doing its own thing |
09:03:06 | Prestige | like it won't full screen or be part of my layout |
09:03:42 | PMunch | Yeah.. |
09:03:50 | PMunch | I've ended up having to xkill steam more than once.. |
09:04:51 | Prestige | maybe it's upset that I make it smaller than its min size |
09:06:40 | * | jwm224 quit (Ping timeout: 272 seconds) |
09:08:03 | PMunch | Ah, now I got this fun bug again.. |
09:08:09 | PMunch | It shows a window I can't click anything in |
09:08:31 | bung | oh , devel doc has a linked list find |
09:08:34 | * | jwm224 joined #nim |
09:08:35 | Prestige | A particular steam window? I want to test it out if you can recreate it |
09:10:45 | PMunch | It seemed to happen when I moved a game from one library to another, then moved the "Moving game" window while it was moving. When it finished I couldn't interact with the window any longer |
09:38:13 | PMunch | Hmm: /home/peter/.nimble/pkgs/compiler-1.3.5/compiler/vmops.nim(109, 5) Error: not all cases are covered; missing: {backend} |
09:40:42 | * | konvertex joined #nim |
09:42:20 | PMunch | Is there a way to download a particular version of the compiler API with nimble? |
09:46:40 | bung | you want store the api data? |
09:46:41 | FromDiscord | <dom96> nimble install [email protected] |
09:59:09 | PMunch | Ah it was @ and not # |
09:59:11 | PMunch | Makes sense |
09:59:21 | PMunch | But there is no way to get devel? |
09:59:55 | PMunch | @dom96 ^ |
10:01:39 | Yardanico | @#head ? |
10:01:47 | Yardanico | nimble install compiler@#head |
10:01:53 | Yardanico | that's how it works for nimble generally :) |
10:02:27 | PMunch | Right.. |
10:02:36 | PMunch | Would be nice if this was in the --help message.. |
10:02:40 | * | MortS joined #nim |
10:10:17 | FromDiscord | <dom96> PRs welcome 😛 |
10:13:17 | Yardanico | https://quuxplusone.github.io/blog/2020/05/28/oo-antipattern/ |
10:14:25 | Yardanico | #3 on HN lol |
10:19:15 | * | fredrikhr joined #nim |
10:19:17 | PMunch | Haha, that's like almost all code in Nim :P |
10:19:31 | PMunch | @dom96, I should've seen that coming.. |
10:39:43 | * | letto quit (Quit: Konversation terminated!) |
10:41:13 | * | CcxCZ quit (Quit: WeeChat 2.4) |
10:41:40 | * | letto joined #nim |
11:00:35 | FromGitter | <sheerluck> is it possible to switch https://play.nim-lang.org/#ix=xxxx to `--gc:arc` or `--gc:none` mode with some pragma inside? Like `--passC=` but for nim? |
11:00:58 | Yardanico | no |
11:01:12 | Yardanico | playground doesn't support things like that yet |
11:01:29 | FromGitter | <sheerluck> well I will use https://wandbox.org then |
11:01:33 | Yardanico | okay |
11:02:22 | PMunch | PRs welcome :) |
11:04:45 | FromGitter | <sheerluck> So this is what I found out. If you take this working https://wandbox.org/permlink/K9juRfres8B4JXJB and add `--gc:arc` to "Compiler options" it will say that `nimErr_ undeclared` and `label BeforeRet_ used but not defined` |
11:07:51 | Yardanico | @sheerluck that code looks a bit wrong anyway |
11:07:55 | Yardanico | why use {.global.} at top level? |
11:08:00 | Yardanico | but yeah report an issue |
11:09:19 | PMunch | https://github.com/PMunch/nimlsp/issues/51 <- could anyone test this in another editor? |
11:09:19 | disbot | ➥ Failure when asked to give definition in file that wasn't explicitly opened |
11:10:10 | Yardanico | PMunch: I didn't really understand the issue, what exactly do I need to try? |
11:10:17 | Yardanico | go to definition if the target definition is not in an opened file? |
11:10:31 | PMunch | No |
11:10:42 | PMunch | Follow a definition into a file that you haven't opened yet |
11:10:52 | PMunch | Then see in the logs if this triggers a didOpen event |
11:10:54 | Yardanico | isn't that what I said? :P |
11:11:05 | Yardanico | oh, idk if vscode-nim-lsp does that logging, hm |
11:11:08 | PMunch | Err, yes |
11:11:28 | PMunch | I was actually meaning to say "then do another lookup of a definition in that file" |
11:11:40 | PMunch | Because that is what actually triggers the exception and doesn't work |
11:12:06 | PMunch | But what I'm really interested in is if other editors will create a didOpen event for this scenario |
11:12:55 | * | dadada__ quit (Ping timeout: 256 seconds) |
11:13:20 | * | MortS left #nim (#nim) |
11:14:05 | * | MortS joined #nim |
11:14:26 | * | dadada joined #nim |
11:14:50 | * | dadada is now known as Guest53197 |
11:19:58 | * | CcxWrk joined #nim |
11:28:41 | * | fredrikhr quit (Ping timeout: 246 seconds) |
11:30:21 | * | MortS quit (Quit: leaving) |
11:30:38 | * | monokrom joined #nim |
11:36:10 | FromGitter | <sheerluck> my first issue #14480 |
11:36:12 | disbot | https://github.com/nim-lang/Nim/issues/14480 -- 3--gc:arc generate invalid code for {.global.} («nimErr_» in NIM_UNLIKELY) ; snippet at 12https://play.nim-lang.org/#ix=2nzs |
11:37:16 | FromGitter | <sheerluck> I feel like I accomplished something today |
11:40:44 | Araq | :-) |
11:40:49 | * | MortS joined #nim |
11:40:57 | FromDiscord | <mratsim> welcome to the club |
11:41:14 | Yardanico | @sheerluck you might have 10 issues in a month then :P |
11:42:22 | Yardanico | @sheerluck seems to might've been related to https://github.com/nim-lang/Nim/issues/14240 |
11:42:24 | disbot | ➥ [exceptions:goto] C compiler error with dynlib pragma calling a proc ; snippet at 12https://play.nim-lang.org/#ix=2nzx |
11:43:43 | Yardanico | at least the C compiler error is exactly the same (minus the file diffs) |
11:44:28 | * | fredrikhr joined #nim |
11:44:42 | * | NimBot joined #nim |
11:58:21 | * | nphg quit (Quit: Leaving.) |
12:03:06 | * | onionhammer quit (Read error: No route to host) |
12:04:18 | Zevv | One of these questions again I actually feel ashamed about, but I never properly used inheritance in Nim: http://ix.io/2nzE |
12:04:38 | Zevv | My fruit loses its appleness when I put it in a box, and I get an ObjectAssignmentDefect. |
12:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:40 | * | supakeen joined #nim |
12:06:50 | * | theelous3 joined #nim |
12:08:55 | alehander92 | hmm |
12:11:22 | PMunch | Make your objects ref objects: https://play.nim-lang.org/#ix=2nzG |
12:12:34 | PMunch | The Box only has room for a Fruit object, and Fruit objects only have type information while Apple objects are bigger with an additional color. When using a ref object the Box only stores a reference which can point to all kinds of sizes, including Apples. |
12:12:39 | PMunch | Zevv ^ |
12:13:10 | Zevv | ah dang, that's not the first time that happened to me :/ |
12:13:24 | alehander92 | you should eat more vegetables |
12:13:31 | alehander92 | i don't do it nearly enough tho |
12:13:40 | Zevv | Yeah, I would explain it exactly so if some else asked me I guess :) |
12:14:22 | alehander92 | sorry! but still applicable |
12:14:22 | Zevv | can we arase the above 10 lines from all the IRC logs? |
12:14:22 | alehander92 | :D |
12:14:24 | * | letto quit (Quit: Konversation terminated!) |
12:14:36 | PMunch | Haha :P |
12:15:26 | alehander92 | the fruit accident |
12:16:09 | * | sacredfrog quit (Quit: ZNC 1.8.0 - https://znc.in) |
12:16:15 | * | letto joined #nim |
12:16:35 | * | rockcavera joined #nim |
12:16:42 | Zevv | Just like the enigmatic "spaghetti incident" that gets referenced in the Calvin and Hobbes a few times |
12:16:57 | Zevv | As a kid I went through *all* the albums again and again, looking for the incident |
12:16:59 | Zevv | but it was never there |
12:17:46 | alehander92 | is it a cold war |
12:17:47 | alehander92 | reference |
12:17:56 | alehander92 | or cold spaghetti reference |
12:18:40 | Zevv | argh, and in the end my code was ok all along, I stareted out with ref objects of course, but my problem was in a completely idfferent place |
12:20:12 | Zevv | so, my closures are gone now in the async poc. Now only to do the CPS in Nim and it's done |
12:22:27 | Araq | I already love your POC ;-) |
12:23:10 | Zevv | I don't like this now: https://github.com/zevv/nimcoro/blob/master/main.nim#L55 |
12:23:21 | PMunch | Araq, since the finaliser refers to the type and not the object, why doesn't it just look for a `proc finalizer(x: ref T)`? https://nim-lang.org/docs/system.html#new%2Cref.T%2Cproc%28ref.T%29 |
12:23:27 | Zevv | I need to explicitly convert back to MyTask |
12:24:17 | PMunch | Zevv, why doesn't that just take a MyTask? |
12:24:26 | PMunch | It will only work for MyTask anyways.. |
12:24:51 | Zevv | I can't pass it to newCoro then, that wants a `proc(task: TaskBase)` |
12:25:22 | Zevv | I'm not strong on this inheritance thing it seems :) |
12:25:59 | PMunch | Huh, that's odd. Shouldn't MyTask match a TaskBase? |
12:26:13 | * | FromDiscord quit (Remote host closed the connection) |
12:26:26 | * | FromDiscord joined #nim |
12:26:28 | Zevv | yeah, but does that mean `proc(t: MyTask)` matches `proc(t: TaskBase)`? |
12:26:31 | Zevv | that's oranges and apples |
12:26:36 | * | nphg joined #nim |
12:29:50 | PMunch | Well it's apples and fruts.. |
12:29:53 | PMunch | fruits* |
12:30:15 | PMunch | Is an apple a fruit? Would someone asking for a fruit accept an apple? |
12:30:27 | PMunch | Maybe you need to use methods.. |
12:30:39 | Zevv | I will *never* touch methods again |
12:30:50 | PMunch | Haha :P |
12:30:53 | * | Kaivo quit (Quit: updating kernel) |
12:30:55 | PMunch | Bad memories? |
12:31:12 | Zevv | But true, apple matches fruit, but Box-of-apples does not match Box-of-fruit |
12:31:56 | Zevv | I trying to force this down the compilers throat somehow, but it just doesn't want to swallow. |
12:32:50 | * | Kaivo joined #nim |
12:33:20 | * | haxscramper joined #nim |
12:33:34 | FromDiscord | <mratsim> use concepts :p |
12:33:57 | FromDiscord | <mratsim> but I guess it's generics rearing their ugly heads again |
12:34:28 | FromDiscord | <mratsim> I agree with Zevv though, I'm never using methods again |
12:34:48 | Zevv | well, this was araqs idea anyway :) |
12:35:09 | FromDiscord | <mratsim> I went all the way to implement macros to emulate inheritance with object avariants: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nim |
12:35:20 | Zevv | wow |
12:35:49 | Zevv | I thought you did that for performance reasons |
12:36:01 | FromDiscord | <mratsim> otherwise I just store the data in the object, and then have my proc load whatever is needed from the object fields |
12:36:01 | haxscramper | I have `proc`, define like this: `proc t[T](arg: Option[(T, int)]) = discard` and it gives me compilation error (even without instantiation): `Mixing types and values in tuples is not allowed`. If I remove `Option` everything works correctly (declaration and instantiation). What's wrong with the first proc? |
12:37:39 | FromDiscord | <mratsim> Multiple reasons:↵- No shared ref object because it's a pain to multithread↵- no heap allocation because cache misses are much more expensive than a case/switch↵- no heap allocation because it avoids memory fragmentation when the objects are stored in a sequence, and memory fragmentation is a much bigger issue than having all object variant be the same sidze as the max object size |
12:38:25 | Zevv | that says nothing about Nim methods being flakey :) |
12:38:55 | FromDiscord | <mratsim> well, they are but I don't need to prove that :p |
12:39:22 | FromDiscord | <mratsim> at least they are flaky with generics |
12:39:23 | PMunch | haxscramper, try proc t[T](arg: Option[tuple[field1: T, field2: int]]) |
12:40:04 | Zevv | mratsim: right. So I'm not going to try to solve my current issue with generics. I'll just leave the explicit conversion in :) |
12:41:22 | FromDiscord | <mratsim> in any case, I think you should be very careful with ref objects with a task system |
12:41:41 | haxscramper | PMunch: thanks it is working now. Is there any known reason why it fails did't work with regular tuple? |
12:42:07 | FromDiscord | <mratsim> when switching task, the GC will scan the stack, which is empty since there is no references there, and may collect your old stack even though it shouldn't |
12:42:15 | alehander92 | methods are ok if you dont do generics with them i guess |
12:42:19 | PMunch | Did the playground just die? |
12:42:30 | PMunch | Oh wait, seems to have come back now |
12:43:23 | PMunch | haxscramper, not sure really.. I rarely if ever use anonymous tuples, so I haven't run into this before. |
12:44:27 | FromDiscord | <mratsim> also what language is that? https://github.com/zevv/nimcoro/blob/master/coro.nim#L89 |
12:46:24 | Zevv | its dutch for yield() |
12:47:15 | Zevv | someone put yield in the list of reserved keyword. dont ask me why |
12:47:25 | Zevv | so now I am forced to jield instead |
12:47:39 | PMunch | I'm still voting for relinquish |
12:47:45 | PMunch | Way harder to type though :P |
12:48:08 | PMunch | submit? |
12:48:38 | PMunch | concede? |
12:48:44 | Zevv | zzzz() |
12:49:26 | PMunch | Then have different semantics based on if you're using zzz zzzz or zzzzz |
12:49:34 | * | nphg_ joined #nim |
12:49:44 | Araq | Zevv, 'yield' is used inside iterators |
12:50:20 | stefantalpalaru | Achtung! "/usr/lib/libcrypto.dylib" is unusable on macOS Catalina: https://github.com/status-im/nim-status-client/pull/209 |
12:50:21 | disbot | ➥ sqlcipher |
12:52:01 | Zevv | Araq: yeah, but I'm not inside an iterator :) |
12:52:30 | * | nphg quit (Ping timeout: 256 seconds) |
12:53:26 | FromDiscord | <dom96> stefantalpalaru: does it affect the stdlib ssl support? |
12:53:43 | FromDiscord | <dom96> i.e. can you dynamically link? |
12:54:58 | stefantalpalaru | I don't have a Catalina image at my disposal, only other people's bug reports. Anyway, it would seem dlopen() also fails. |
12:57:15 | stefantalpalaru | Mac users ended up manually copying and symlinking files around, but that's obviously going to be borked by the next OS update. |
12:58:10 | FromDiscord | <dom96> why would they break dlopen'ing openssl though? |
13:00:34 | stefantalpalaru | These guys also use dlopen() and they search the lib dir for versioned lib names to load: https://github.com/saltstack/salt/pull/56958/files#diff-102dd477fd06a685974d94e2f1bf80cbR59 |
13:00:35 | disbot | ➥ Properly handle libcrypto library search on macOS. |
13:00:50 | * | waleee-cl joined #nim |
13:01:18 | FromDiscord | <dom96> pretty sure Nim always depends on various versions of DLLs anyway |
13:03:25 | FromGitter | <kaushalmodi> Araq: Looking forward to https://github.com/nim-lang/Nim/pull/14439 getting merged.. my weekly crons testing my public repos using nim devel have started failing due to a nim doc regression. That PR fixes that (too). |
13:03:26 | disbot | ➥ fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting; other bug fix |
13:03:57 | stefantalpalaru | You're right, dom96: https://github.com/nim-lang/Nim/blob/c817e85f4cddeddf534ea2890f7f741388ed1ff8/lib/wrappers/openssl.nim#L67 |
13:04:10 | * | zedeus joined #nim |
13:04:26 | planetis[m] | is this a sizeof bug: https://play.nim-lang.org/#ix=2nzO ? |
13:04:58 | planetis[m] | padding would make it 8 bytes |
13:05:51 | FromDiscord | <mratsim> uint16 only need to be 2 bytes aligned |
13:06:01 | FromDiscord | <mratsim> so 6 bytes total is normal |
13:06:18 | FromDiscord | <mratsim> and that's what the playground is returning for me |
13:06:29 | planetis[m] | ok thanks |
13:22:45 | Araq | kaushalmodi: how can we get Timothee to work on the important things? |
13:23:35 | Araq | pushing docgen bugs around isn't all that productive |
13:23:38 | FromGitter | <timotheecour> trust me, i really don’t want to do any nim doc related stuff |
13:23:48 | Araq | oh hi :D |
13:23:59 | FromGitter | <timotheecour> i just wanna get this out of the way |
13:25:13 | FromGitter | <timotheecour> and hi :) |
13:25:46 | FromGitter | <kaushalmodi> Araq: docs are important! |
13:26:10 | Araq | yes, they are, but you don't have to rely on all the edge cases |
13:26:14 | FromGitter | <kaushalmodi> With the recent --project fixes, I can finally publish the docs for the SystemVerilog associated Nim library at work |
13:27:07 | Araq | nice :-) |
13:27:27 | alehander92 | timothee thanks for the unthankful work :P |
13:27:28 | FromDiscord | <mratsim> docs are a pain :/ |
13:27:56 | FromDiscord | <mratsim> everytime i want to do docs, I spent 10 min trying to format tables in RST |
13:28:14 | Araq | .. raw:: |
13:28:20 | Araq | <table> ... </table> |
13:28:23 | Araq | simple. |
13:28:29 | FromDiscord | <mratsim> then try to cook up a script to multi nimble files documentation |
13:28:39 | Araq | use any HTML based tool to produce them |
13:28:42 | FromDiscord | <mratsim> .nim* |
13:28:48 | FromGitter | <kaushalmodi> mratsim: tables in Org mode are seamless.. now pandoc exports Org tables to rst tables perfectly |
13:29:07 | FromDiscord | <mratsim> Nim compiler doesn't support grid tables |
13:29:16 | FromGitter | <kaushalmodi> ah, yes, that :) |
13:29:39 | FromGitter | <kaushalmodi> mratsim: ⏎ ⏎ > then try to cook up a script to multi nimble files documentation ⏎ ⏎ --project on nim devel is immensely better [https://gitter.im/nim-lang/Nim?at=5ecfbcc32c49c45f5aa9f7c1] |
13:29:41 | Araq | grid tables are painful to write if you lack the editor support |
13:30:13 | FromDiscord | <mratsim> I use markdown and any markdown -> rst converter produces grid tables |
13:30:32 | FromDiscord | <mratsim> requiring people to write html tables is the same |
13:33:43 | * | zacharycarter quit (Ping timeout: 246 seconds) |
13:33:48 | * | nphg_ quit (Ping timeout: 256 seconds) |
13:34:51 | * | zacharycarter joined #nim |
13:37:36 | * | nphg_ joined #nim |
13:38:31 | FromGitter | <timotheecour> one way to generate table is via a nim macro that does the grunge work of converting to html, eg: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ecfbed74412600ccd731a6e] |
13:38:47 | * | opal quit (Remote host closed the connection) |
13:40:01 | * | opal joined #nim |
13:42:31 | * | rockcavera quit (Remote host closed the connection) |
13:47:47 | * | opal quit (Remote host closed the connection) |
13:55:49 | * | opal joined #nim |
14:00:50 | Araq | timotheecour: sorry, I don't want to be ungrateful. but I'm concerned about "let's use the macro system to build the docgen" |
14:08:23 | * | nphg_ quit (Ping timeout: 258 seconds) |
14:10:20 | * | nphg_ joined #nim |
14:11:54 | FromDiscord | <Recruit_main707> https://golang.org/pkg/builtin/#copy↵which one out of the various copy functions of nim matches this one? |
14:13:19 | FromDiscord | <Recruit_main707> i feel like its deepCopy, but im not sure |
14:15:07 | FromGitter | <timotheecour> that `myTable ` macro can be used independently from docgen-as-a-library, the idea here is to generate tables using nim macros (ie, more flexibility than what rst offers since it allows nim syntax + arbitrary code to build tables); what happens once you have the html is TBD; it could be fed as doc comment althouhg that’s a bit roundabout; ideally rst can consume it directly (magic is 1 option, there’s probably |
14:15:07 | FromGitter | ... another way) |
14:17:43 | * | aeverr quit (Quit: Konversation terminated!) |
14:18:27 | FromDiscord | <mratsim> or we can separate the docgen in a separate tool |
14:18:53 | FromDiscord | <mratsim> and add markdown |
14:19:29 | * | endragor quit (Remote host closed the connection) |
14:21:14 | Araq | "You can display a pipe (|) character in a table by using its HTML character code (|)." |
14:22:50 | FromDiscord | <dom96> @mratsim yes please |
14:23:29 | FromDiscord | <mratsim> yes to which? |
14:24:27 | Araq | to markdown and a new docgen |
14:25:12 | FromDiscord | <dom96> docgen as a separate tool |
14:25:20 | FromDiscord | <dom96> we've got jsondoc already, no? |
14:25:54 | Araq | yup. it doesn't help, but yup |
14:26:09 | FromGitter | <timotheecour> that’s 1 venue but i don’t think it works; but it would be an improvement so that you’d have `nim => json => separate tool => html` |
14:27:52 | * | nphg_ quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) |
14:28:50 | FromGitter | <timotheecour> that’d mean that someone can completely change the frontend (eg serve docs using a karax SPA) without having to change any of the logic that generates the exported symbols (represented as json) |
14:29:03 | Araq | the problem is the 'json' itself. |
14:30:21 | Araq | it either loses information or is de-facto json+(html inside), or json+(markdown/rst inside) |
14:30:23 | FromGitter | <timotheecour> or protobuf if you want a spec; at that point it doesn’t matter too much; if spec evolves, so can the tool |
14:30:53 | Araq | some semi-structured format is involved |
14:31:38 | Araq | and HTML is one such format, so you might as well run a post-processor over today's HTML output |
14:32:14 | FromGitter | <timotheecour> if you all you have are runnableExamples and RST, then parsing RST and running runnableExamples (from raw code as string) would be taken care of by the tool |
14:32:44 | FromGitter | <timotheecour> nim wouldn’t need to know anything about RST |
14:33:40 | Araq | true but the RST remains inside the JSON and the tool needs an RST parser. (same for markdown) |
14:34:09 | Araq | not to mention the problem of cross-links |
14:34:23 | FromGitter | <timotheecour> it would just feed un-processed doc comments and runnableExamples to the tool; no embedded html; ⏎ Yes, the tool does need an RST parsers, that’s a better separation of concern than nim compiler having to knwo abou RST |
14:34:25 | Araq | in fact, the JSON better contains links too then |
14:34:40 | FromDiscord | <dom96> I don't see the problem |
14:34:46 | FromDiscord | <dom96> the JSON should simply contain the raw comments |
14:34:56 | FromGitter | <timotheecour> that’s what I’m saying |
14:34:56 | FromDiscord | <dom96> it's up to the tool to decide what to do with it |
14:37:16 | Araq | as I said, the JSON better contains links too then so that I can click on a type name. |
14:37:34 | FromDiscord | <dom96> does the current docgen support that? 😛 |
14:37:39 | Araq | yes, it does. |
14:37:54 | FromDiscord | <dom96> what, how? Can you link an example? |
14:38:51 | Araq | https://nim-lang.org/docs/asyncdispatch.html#%3D%3D%2CAsyncFD%2CAsyncFD click on AsyncFD |
14:39:18 | FromDiscord | <dom96> oh, right |
14:39:21 | FromDiscord | <dom96> That's not part of the comments |
14:39:31 | FromDiscord | <dom96> The JSON doesn't need links for this |
14:39:37 | FromDiscord | <dom96> but can easily include them |
14:39:43 | Araq | how so? |
14:39:54 | FromDiscord | <dom96> just generate a serialised version of the NimNode |
14:40:06 | FromDiscord | <dom96> and have a field called `url` on proc param nodes |
14:40:13 | Araq | lol |
14:41:28 | Araq | that would work but then the JSON becomes a rather complex tree. Why not just use the HTML tree instead? at least the HTML tree has a spec... |
14:42:06 | FromGitter | <timotheecour> easier to parse html for tooling; html should only ever be used for rendering, never for information exchange |
14:42:26 | FromGitter | <timotheecour> `asier to parse html for tooling;` => `asier to parse json for tooling;` (of course; typo) |
14:42:43 | Araq | so what, we have a HTML parser |
14:42:58 | FromDiscord | <dom96> HTML for information? That's XML |
14:43:05 | FromDiscord | <dom96> *shrug* |
14:43:09 | Araq | but I don't care, PRs are welcome |
14:43:12 | FromDiscord | <dom96> Just create a Nim data structure |
14:43:14 | FromDiscord | <dom96> and serialise it |
14:43:22 | FromDiscord | <dom96> Nim programs can read that fine 😛 |
14:43:35 | Araq | all I am aiming for is that you understand the problem well |
14:44:09 | FromGitter | <kaushalmodi> > easier to parse html for tooling; ⏎ ⏎ I was like, huh! ⏎ ⏎ And then saw your edit :) [https://gitter.im/nim-lang/Nim?at=5ecfce3889941d051a2b2c2c] |
14:44:15 | disruptek | runnableExamples are pretty hard to use as tests, turns out. which sucks. |
14:44:27 | FromGitter | <timotheecour> how so |
14:44:33 | FromGitter | <kaushalmodi> disruptek: how so |
14:44:49 | disruptek | when the fail, it's hard to see /which/ failed. |
14:44:55 | disruptek | s/the/they/g |
14:45:24 | FromGitter | <kaushalmodi> may be something changed? now I see the path to the runnable example in /tmp |
14:45:34 | disruptek | great, what good does that do you? |
14:45:35 | FromGitter | <timotheecour> that’s a small PR away to spit out file/line/col where it came from (which btw is already included in runnableExamples genereated soruce code) |
14:45:42 | disruptek | exactly. |
14:45:52 | disruptek | now i know how you'll be spending your saturday. |
14:46:41 | FromGitter | <kaushalmodi> disruptek: ⏎ ⏎ > great, what good does that do you? ⏎ ⏎ Well, I just run that example, see the error and fix it [https://gitter.im/nim-lang/Nim?at=5ecfced0225dc25f54aff466] |
14:47:25 | disruptek | runnableExamples are pretty hard to use as tests, turns out. which sucks. |
14:49:43 | disruptek | criterion doesn't work at all in nim-1.0. only 1.2+. |
14:50:31 | disruptek | scratch that; it only works with pragmas with args, in 1.0. |
14:54:07 | Zevv | oi Araq: how can I avoid this: https://github.com/zevv/nimcoro/blob/master/main.nim#L57: I need to make my coros take a TaskBase and convert to my own type because newCoro() does not want to take a proc(T) where T is a derivative of TaskBase. |
14:54:28 | Zevv | moi'n disruptek |
14:54:37 | disruptek | try a converter. |
14:54:43 | disruptek | and howdy. |
14:54:45 | FromGitter | <timotheecour> disrputek if there’s no bug tracking whatever problem you’re describing, the bug might as well not exist ;-) |
14:54:57 | disruptek | sure. |
14:55:10 | disruptek | let's pretend stuff is easy to use because we don't have a ticket saying otherwise. |
14:55:18 | disruptek | gtfo |
14:56:28 | * | gxt__ is now known as gxt |
14:56:32 | martinium | anyone ever get this error with async code? SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
14:57:39 | dom96 | That error can happen for millions of reasons |
14:57:50 | dom96 | we need to see a stack trace to help |
14:58:04 | martinium | only just happened now with trying to getOrDefault() from a map |
14:58:14 | Zevv | martinium: show your code, put up a pastebin |
15:00:31 | martinium | https://gist.github.com/martinium/e11f0fd1299675e5c7a0d729f3d342dc |
15:00:48 | martinium | line 88 |
15:00:57 | martinium | assetOs.getOrDefault |
15:01:07 | martinium | that has caused that error |
15:01:09 | martinium | works without it |
15:01:16 | FromDiscord | <mratsim> you use newTable (aka TableRef) |
15:01:26 | FromDiscord | <Technisha Circuit> How would i use a string as a variable name in Nim? |
15:01:29 | FromDiscord | <mratsim> do you always initialize them? |
15:02:08 | martinium | proc getAssetPage initializes them |
15:02:10 | FromDiscord | <Technisha Circuit> So for example i have a string like `"myName"`, how would i turn it into a variable name that i can assign data to |
15:02:23 | FromDiscord | <mratsim> @Technisha Circuit it needs to be static and you need to use a macro, or you just use the identifier (not as string) and use the identifier construction from the manual: https://nim-lang.org/docs/manual.html#templates-identifier-construction |
15:02:38 | * | Vladar quit (Quit: Leaving) |
15:09:39 | FromDiscord | <Recruit_main707> Federico3 i think i have finished my flatbuffers implementation |
15:09:51 | FromDiscord | <Recruit_main707> just in case you want to have a look at it |
15:13:44 | federico3 | url? :) |
15:14:13 | * | MortS quit (Quit: leaving) |
15:14:28 | FromDiscord | <Recruit_main707> ill need a few seconds to post it to github, (im really bad at it :P ) |
15:15:07 | * | MortS joined #nim |
15:15:35 | * | muffindrake quit (Quit: muffindrake) |
15:16:28 | * | muffindrake joined #nim |
15:21:16 | FromDiscord | <Recruit_main707> https://github.com/Albus70007/NimFlatbuffers/tree/master |
15:22:37 | * | MortS quit (Quit: leaving) |
15:22:48 | FromDiscord | <mratsim> flat buffers are that simple? |
15:23:07 | * | MortS joined #nim |
15:23:28 | FromDiscord | <Recruit_main707> i felt like the rest of the files of the other frameworks were really not necessary |
15:23:42 | zacharycarter | have you ever used flatbuffers? they're quite complex and a pretty big PITA |
15:24:04 | FromDiscord | <Recruit_main707> lobster for instance has only one file |
15:24:28 | FromDiscord | <mratsim> Because Skrylar also has a flatbufffers implementation with les than ~300lines, and I was lke, mmmh no way it's so easy: https://github.com/Skrylar/skflatbuffers/blob/master/skflatbuffer.nim |
15:24:44 | * | MortS quit (Client Quit) |
15:25:05 | * | MortS joined #nim |
15:25:31 | FromDiscord | <Recruit_main707> generics make sources smaller also, |
15:25:51 | FromDiscord | <mratsim> shhhh, there are Go developers there, don't talk too much about how nice generics are |
15:26:41 | FromDiscord | <Recruit_main707> (*they must face it and start using nim over go*) |
15:26:59 | FromDiscord | <Technisha Circuit> Am i able to turn json objects into types? |
15:27:07 | FromDiscord | <Recruit_main707> actually yes |
15:27:11 | FromDiscord | <Technisha Circuit> Because I can turn types to json objects |
15:27:18 | FromDiscord | <Technisha Circuit> Oh? |
15:27:30 | FromDiscord | <Recruit_main707> [JsonNode].to([type]) |
15:28:27 | * | MortS quit (Client Quit) |
15:30:11 | * | MortS joined #nim |
15:40:22 | disruptek | you're blowing my mind right now. |
15:43:23 | federico3 | Recruit_main707: make sure you *never* call quit() inside a library |
15:43:59 | FromDiscord | <Recruit_main707> they do it in both python and go, thats why i did, i can ask them why though |
15:45:19 | federico3 | that's their fault; don't follow poor design choices |
15:48:43 | codic | :P |
15:49:23 | FromDiscord | <Recruit_main707> ok, ok if thats the only thing you can see that should be changed i guess thats good :) |
15:53:33 | zacharycarter | what would `unsigned char**` be in Nim? `ptr UncheckedArray[ptr char]` ? |
15:54:05 | zedeus | `UncheckerArray[char]` is char*, so just no need for ptr char |
15:54:21 | * | rockcavera joined #nim |
15:54:28 | zacharycarter | so just `ptr UncheckedArray[char]`? |
15:55:19 | FromDiscord | <Generic> unsigned char != char |
15:55:21 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
15:55:31 | zacharycarter | well according to the Nim docs it is |
15:55:39 | zacharycarter | cuchar = char |
15:55:44 | FromDiscord | <Generic> oh you're right |
15:55:48 | zedeus | I think it depends on the usage, ** doesn't specify if it's a pointer to a list or a 2d list |
15:55:48 | FromDiscord | <Generic> that's confusing |
15:56:07 | zacharycarter | zedeus hmm yeah |
15:56:16 | FromDiscord | <Generic> my bad, it depends on what you're trying to archive |
15:56:31 | zacharycarter | I'm guessing it's the latter since this is intended to hold pixel data |
15:56:43 | FromDiscord | <Generic> a pointer can point to a single object |
15:56:53 | FromDiscord | <Generic> or to the first object of a list |
15:57:17 | zedeus | possibly, but 1d arrays are more efficient so it could still be a pointer to a list |
15:57:22 | FromDiscord | <Generic> the first one would be ptr UncheckedArray[ptr char], while the latter would be ptr UncheckedArray[ptr UncheckedArray[char]] |
15:57:58 | FromDiscord | <Generic> zedeus is right, for pixel data, better use a single list with the size of width*height |
15:58:23 | FromDiscord | <Generic> and index it with [(x + y * width) * colorchannels] |
15:58:40 | zacharycarter | hmm okay thanks |
16:01:04 | zedeus | UncheckedArray[T] is translated to `T data[]` in C, so `ptr UncheckedArray[ptr char]` would be `T **data[]` which I believe is equivalent to `T ***data` |
16:01:52 | zedeus | or in english, a pointer to an array of pointers |
16:02:35 | solitudesf | UncheckedArray does not imply pointer |
16:03:48 | zedeus | there's no actual difference between arrays and pointers in C, so `data[]` == `*data` |
16:03:50 | solitudesf | !eval var a = "abc"; let b = cast[ptr UncheckedArray[char]](addr a[0]); echo b[1] |
16:03:52 | NimBot | b |
16:09:57 | * | solitudesf quit (Quit: Leaving) |
16:14:30 | * | ftsf_ quit (Ping timeout: 258 seconds) |
16:14:30 | * | njoseph joined #nim |
16:16:10 | zedeus | hmm yeah, the C code produced for that is (NIM_CHAR*), I didn't expect that |
16:16:20 | zedeus | the manual just says it's an array, which implies pointer |
16:17:51 | FromDiscord | <mratsim> @Zedeus UncheckedArray != ppointer |
16:18:01 | FromDiscord | <mratsim> ptr UncheckedArray is equivalent to a C pointer or a C array |
16:18:08 | FromDiscord | <mratsim> it's a single indirection |
16:18:12 | zedeus | what is UncheckedArray by itself then? |
16:18:25 | FromDiscord | <mratsim> a C dynamic unsized array |
16:18:46 | FromDiscord | <mratsim> `int arr[]` |
16:19:20 | FromDiscord | <mratsim> the name is "flexible array member" |
16:21:31 | zedeus | so `UncheckedArray[int]` is `int arr[]` but `ptr UncheckedArray[int]` is `int *arr` |
16:21:51 | FromDiscord | <mratsim> yes |
16:22:03 | FromDiscord | <mratsim> it's the same in C |
16:22:06 | zedeus | I can't figure out how to use UncheckedArray without ptr, any cast I try fails and using it in an object (like in the manual) leads to "'UncheckedArray[char]' in this context: 'Nice' for var" |
16:22:23 | FromDiscord | <mratsim> you can't |
16:22:36 | * | PMunch quit (Quit: leaving) |
16:22:38 | FromDiscord | <mratsim> you can't have unsized objects on the stack |
16:22:56 | zedeus | is the manual wrong then? I feel like I'm missing something |
16:23:14 | FromDiscord | <mratsim> also UncheckedArray MUST be the last field of an object: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/io/h264.nim#L20-L25 |
16:23:25 | FromDiscord | <mratsim> that's a C requirement |
16:23:36 | zedeus | yeah I did that |
16:23:40 | zedeus | https://nim-lang.org/docs/manual.html#types-unchecked-arrays |
16:57:18 | * | martinium quit (Remote host closed the connection) |
17:00:19 | zacharycarter | hmm I'm generating some wrapper code using Nimterop and some of the types have array members |
17:00:28 | zacharycarter | and some have multi dimensional array members |
17:00:39 | FromDiscord | <Technisha Circuit> Could i use NimScript as a alternative to json in Nim? |
17:00:43 | zacharycarter | I've been having to overload `[]` and `[]=` for each of these types |
17:00:51 | * | dddddd joined #nim |
17:00:58 | zacharycarter | which is annoying, but fine - I'm pretty sure there's a better way |
17:01:01 | zedeus | NimScript is not a datatype |
17:01:08 | FromDiscord | <Technisha Circuit> Ik |
17:01:17 | FromDiscord | <Technisha Circuit> But could i use it that way? |
17:01:27 | zedeus | why would you do that |
17:01:32 | zacharycarter | these overloads work for single dimension arrays but not multidimensional |
17:01:39 | zacharycarter | I figured I could used nested openarrays but nope |
17:01:46 | FromDiscord | <Technisha Circuit> > why would you do that↵Just curious |
17:03:03 | zacharycarter | so I'm not quite sure what to do here... |
17:03:17 | zedeus | the answer to "can I do X" is yes 99% of the time, but "should I do X" is also no 99% of the time, asking if you could do it is a waste of time |
17:06:09 | * | dcmertens joined #nim |
17:09:12 | bung | I dont think so |
17:10:01 | dcmertens | Ugh, nim's lack of incremental compile (https://github.com/nim-lang/RFCs/issues/46) bit me really hard yesterday |
17:10:33 | dcmertens | I plan on writing lots of short nim programs that plot, and compiling a simple program that uses nim's version of ggplot2 takes 25 seconds every time |
17:10:50 | zedeus | easy fix, get a better cpu |
17:12:23 | dcmertens | sure |
17:12:25 | * | rockcavera quit (Remote host closed the connection) |
17:12:36 | dcmertens | but in the meantime, I think I'll hack on some PLplot bindings |
17:12:43 | zacharycarter | I don't even understand why I have to overload `[]` for all of these types... |
17:12:50 | dcmertens | not because PLplot is beautiful, but because they'll have zero nim dependencies |
17:13:04 | dcmertens | plus, it'll give me a good learning exercise |
17:13:06 | dcmertens | :-) |
17:13:33 | zacharycarter | and whenever I try to provide an overload for a nested array I blow up the call stack |
17:13:36 | zacharycarter | with recursive calls |
17:13:38 | zacharycarter | this is dumb |
17:16:51 | zacharycarter | can anyone explain why I'm having to do this to me? |
17:16:59 | zacharycarter | I'll cook up an example quickly |
17:19:03 | * | vqrs quit (Ping timeout: 272 seconds) |
17:20:11 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
17:20:24 | * | vqrs joined #nim |
17:23:52 | zacharycarter | https://play.nim-lang.org/#ix=2nCU |
17:24:18 | zacharycarter | whoops sorry forgot something |
17:24:40 | zacharycarter | https://play.nim-lang.org/#ix=2nCV |
17:24:58 | zacharycarter | I don't understand why the subscript operator won't "just work" here |
17:24:59 | Zevv | does not compile |
17:25:04 | zacharycarter | yeah that's my point |
17:25:15 | Zevv | ah ok :) I thought you were blowing up the call stack |
17:25:24 | zacharycarter | well I can make it do that :P |
17:25:29 | zacharycarter | if I try to provide an overload for `[]` |
17:25:37 | zacharycarter | but I don't understand why I need to overload this in the first place |
17:25:46 | * | casaca quit (Quit: leaving) |
17:25:50 | zacharycarter | nor how to do it so I don't have to do it for every type I define like this |
17:26:27 | Zevv | The distinct is messing stuff up |
17:26:30 | zacharycarter | ah |
17:26:31 | Zevv | you're indexing with an int |
17:27:18 | zacharycarter | so I need a converter? int to what? Ordinal? |
17:28:15 | Zevv | https://play.nim-lang.org/#ix=2nCW |
17:28:17 | Zevv | be explicit |
17:29:27 | zacharycarter | thanks |
17:30:30 | leorize | shashlick: why does a bunch of nimterop apis require `static:`? |
17:30:38 | leorize | can we make do without them? |
17:31:11 | leorize | like the entirety of nimterop functions at compile time, it's kinda weird to have APIs needing `static:` to work |
17:39:25 | * | fredrikhr quit (Ping timeout: 265 seconds) |
17:43:45 | FromDiscord | <mratsim> static enforce compile-time evaluation |
17:44:09 | FromDiscord | <mratsim> you can have template that call static internally as API though |
17:50:23 | Zevv | where's disbot? |
17:50:28 | Zevv | he ded? |
17:50:50 | leorize | !repo disbot |
17:50:56 | leorize | yea he ded |
17:50:58 | leorize | ping disruptek |
17:53:31 | * | Vladar joined #nim |
17:53:58 | * | Guest53197 quit (Ping timeout: 256 seconds) |
17:56:08 | * | avatarfighter joined #nim |
17:56:24 | * | avatarfighter quit (Client Quit) |
17:59:32 | shashlick | they are procs - used to be macros then i was pushed to make them this way |
18:02:27 | shashlick | https://github.com/nimterop/nimterop/pull/102 |
18:07:41 | * | rockcavera joined #nim |
18:09:00 | FromDiscord | <willyboar> ~stream |
18:17:52 | * | casaca joined #nim |
18:23:20 | FromDiscord | <Technisha Circuit> How would i increase the speed of the speed of the compiler? |
18:25:01 | zedeus | https://github.com/nim-lang/compilerdev |
18:25:03 | zedeus | here's some ideas :) |
18:25:28 | Zevv | you want to increase it's acceleration? |
18:25:56 | FromDiscord | <Technisha Circuit> O |
18:26:19 | FromDiscord | <Technisha Circuit> > you want to increase it's acceleration?↵It takes a while to compile larger files, so i want to spend that up somehow |
18:26:27 | leorize | shashlick: personally I think this is a misuse of the `{.compileTime.}` pragma |
18:26:46 | leorize | now we have to put everything in static blocks |
18:26:53 | leorize | no not everything, just some of them |
18:27:03 | leorize | makes the api a bit weird |
18:27:11 | Zevv | Technisha Circuit: I'm a bit curious what kind of files you are compiling, since Nim is pretty fast as it is already |
18:27:36 | leorize | he could be compiling a proc with a thousand parameters or so :P |
18:27:44 | leorize | that can take several days, ask PMunch |
18:27:57 | FromDiscord | <Recruit_main707> he is compiling it in android i think |
18:28:20 | Zevv | oh right :/ |
18:32:52 | * | dadada joined #nim |
18:33:16 | * | dadada is now known as Guest49863 |
18:33:37 | FromDiscord | <Technisha Circuit> Yup |
18:33:49 | FromDiscord | <Technisha Circuit> Android compiling times are super slow ;-; |
18:34:08 | Zevv | yeah, well, don't blame that on the compiler :) |
18:35:05 | FromDiscord | <Rika> get a better phone or ***dont compile on a phone*** |
18:35:35 | FromDiscord | <Technisha Circuit> The only device i have to code on ***is my phone*** |
18:35:41 | FromDiscord | <Rika> why. |
18:35:48 | FromDiscord | <Technisha Circuit> And my phone is a p30 lite |
18:35:51 | FromDiscord | <Technisha Circuit> So it's decent |
18:36:00 | FromDiscord | <Rika> okay so why do you only have a phone |
18:36:03 | FromDiscord | <Technisha Circuit> > why.↵Because i have no access to my pc |
18:36:20 | FromDiscord | <Technisha Circuit> My pc is in another city so ;-; |
18:36:22 | FromDiscord | <Avatarfighter> ngl i think compiling on a phone is the coolest thing I've heard today |
18:36:23 | FromDiscord | <Rika> so is it that you dont have a pc or you cant use your pc |
18:36:24 | FromDiscord | <Rika> ssh???? |
18:36:40 | FromDiscord | <Rika> or is it off |
18:36:50 | FromDiscord | <Technisha Circuit> > ngl i think compiling on a phone is the coolest thing I've heard today↵I have been coding on my phone for about 3 years now |
18:36:53 | FromDiscord | <Technisha Circuit> It's off |
18:36:56 | FromDiscord | <Rika> i see |
18:37:05 | FromDiscord | <Technisha Circuit> And it's too loud to keep on so my dad would turn it off anyway |
18:37:17 | FromDiscord | <Technisha Circuit> And i think ny dad turned off my rpi |
18:37:26 | FromDiscord | <Technisha Circuit> Or the ip changed because I can't access it anymore |
18:37:37 | FromDiscord | <Technisha Circuit> (edit) 'ny' => 'my' |
18:39:30 | FromDiscord | <Recruit_main707> can you create a nimble package that doesnt need compilation? |
18:39:39 | FromDiscord | <Rika> what |
18:39:54 | FromDiscord | <Recruit_main707> like, it just includes the source files |
18:40:11 | FromDiscord | <Recruit_main707> and they are compiled when used |
18:40:18 | FromDiscord | <Technisha Circuit> Doesn't it get compiled when imported? |
18:40:36 | FromDiscord | <Technisha Circuit> Isn't that how it works already? Or am I stupid? |
18:40:38 | FromDiscord | <Recruit_main707> but ive seen that some packages get compiled |
18:40:45 | FromDiscord | <Technisha Circuit> Some packages |
18:40:52 | FromDiscord | <Rika> huh? |
18:41:02 | FromDiscord | <Rika> there are packages that are source only |
18:41:10 | FromDiscord | <Rika> and compiled on use |
18:41:15 | FromDiscord | <Technisha Circuit> Because they are either hybrid or an app (take this with a grain of salt) |
18:41:25 | * | abm joined #nim |
18:41:29 | FromDiscord | <Recruit_main707> i guessed they existed obv, but how is that done? |
18:41:39 | FromDiscord | <Rika> initialize it as a library |
18:41:43 | FromDiscord | <Rika> in nimble init |
18:50:29 | shashlick | leorize: what do you propose |
18:50:37 | shashlick | path forward |
18:50:49 | shashlick | i don't like the static blocks either |
18:51:35 | FromDiscord | <Recruit_main707> who wants to create a flac-like tool for nim?! |
18:52:34 | FromDiscord | <Rika> ?! |
18:52:47 | FromDiscord | <Rika> i dont mind trying to write metaflac in nim |
18:53:10 | FromDiscord | <Recruit_main707> i dont think my brain can take it, but i dont want to do it manually |
18:53:23 | FromDiscord | <Rika> why the ?! btw |
18:53:34 | FromDiscord | <Recruit_main707> repersents fake excitement |
18:55:04 | FromDiscord | <Rika> it's more of shock to me |
18:55:48 | FromDiscord | <Recruit_main707> yeah, its not easy to transmit feelings with plain text :) |
18:56:24 | FromDiscord | <Rika> fuck plain text lets engineer a text that can convey emotion |
18:56:42 | FromDiscord | <Recruit_main707> just after i finish flatc-nim |
18:57:45 | * | waleee-cl joined #nim |
19:00:11 | * | bjorob joined #nim |
19:01:14 | * | MortS quit (Ping timeout: 260 seconds) |
19:01:21 | FromGitter | <kaushalmodi> ?! is interrobang .. there was an interesting podcast episode on that on 99% Invisible podcast |
19:02:48 | * | MortS joined #nim |
19:04:00 | * | tane joined #nim |
19:04:10 | * | Guest49863 is now known as dadada |
19:04:27 | dadada | do we have an int like type that defaults to -1 ? |
19:05:04 | dadada | I think this could be useful for procs/templates whose default return value should be that something doesn't exist or is invalid, and sometimes 0 is a valid value |
19:05:46 | dadada | for example 0 is a valid index of an array, while -1 isn't |
19:06:24 | dadada | for example when |
19:08:47 | FromDiscord | <Recruit_main707> ts2nim works?↵i mean, it works fine? |
19:09:13 | FromDiscord | <Recruit_main707> can it transpile all or most typescript code situations to nim? |
19:09:31 | FromGitter | <kaushalmodi> dadada: Looks like you need Options |
19:12:40 | FromDiscord | <Rika> Recruit its being worked on |
19:12:47 | FromDiscord | <Rika> try it and see if it works |
19:13:37 | * | MortS quit (Quit: leaving) |
19:14:11 | FromDiscord | <Recruit_main707> just thinking on the fact that using flatc w/ typescript, transpiling it to nim could work puts an smile on my face |
19:21:26 | codic | how can i get the whole line as a string that contains a substring? |
19:22:11 | codic | That sounds confusing. let me try again. if i have a string that's multi line, how do i get the whole line that contains/starts with a substring? |
19:36:37 | codic | highlight/ping me if you have an answer |
19:37:30 | FromGitter | <kaushalmodi> codic: `if s.contains(substr): echo s` ? |
19:38:15 | codic | that's to check if it contains the substr |
19:38:17 | codic | not what i want |
19:38:23 | codic | I want to get the whole line that contains the substr |
19:38:37 | FromDiscord | <Elegant Beef> The strscans or regex modules is where you want to look |
19:40:44 | * | lritter joined #nim |
19:42:30 | * | kradnoel joined #nim |
19:42:46 | codic | i'd rather not use regex, but if i had to can you give an example |
19:46:44 | Zevv | codic: I think most effective would be to find the offset of the substring, and then seach backwards and forwards for newlines |
19:47:46 | Zevv | if performance is not really an issue you can iterate over all the lines of your string with lines(), and then check each individual line for your string. |
19:49:47 | * | haxscramper quit (Remote host closed the connection) |
19:51:14 | * | sschwarzer joined #nim |
19:52:02 | * | dcmertens quit (Ping timeout: 272 seconds) |
19:53:45 | sschwarzer | As an experiment, I've implemented a lazy tree iterator where you can delete nodes while iterating. This is a follow-up on https://forum.nim-lang.org/t/5697#35547 . The code is at https://hg.sr.ht/~sschwarzer/lazytree/browse/src/lazytree.nim and tests at https://hg.sr.ht/~sschwarzer/lazytree/browse/tests/test_lazytree.nim . I thought I'd ask for review/feedback before posting the new code in the forum. |
19:53:59 | sschwarzer | :-) |
19:55:45 | sschwarzer | I hope I don't have bugs this time. ;-) At least I trust the new code much more than the old. :) |
19:56:33 | FromGitter | <kaushalmodi> narimiran: Does `koch docs` run as part of CI? |
19:56:51 | FromDiscord | <Technisha Circuit> What's flatc? |
19:56:53 | FromGitter | <phdye> Can anyone point me at details of how to create static/global/non-heap data structures in a shared library for loading in another app ? I've tried plain objects (not refObj) but accessing the object causes crashes. I'm shooting to emulate pretty vanilla, albeit low-level, C behavior here. |
19:57:24 | FromGitter | <kaushalmodi> narimiran: I am trying to understand why I see this error locally: https://github.com/nim-lang/Nim/issues/14485 while the nim CI is green |
19:57:26 | disbot | ➥ `koch docs` (`nim doc lib/pure/strutils.nim`) fails [devel] [regression] ; snippet at 12https://play.nim-lang.org/#ix=2nDS |
19:57:42 | leorize | phdye: plain objects doesn't work? |
19:57:48 | leorize | @phdye |
19:58:01 | leorize | make sure the types are C-compatible |
19:58:16 | leorize | ie. use cint instead of int, etc |
19:58:59 | leorize | also tag the type with `{.bycopy.}`. this removes all C-incompatible optimization that nim might introduce |
19:59:08 | FromGitter | <kaushalmodi> narimiran: Ah, I just got a Doc CI failure email for a PR .. so it is indeed run, but it doesn't affect the "green" status of CI |
19:59:13 | FromGitter | <phdye> Are objects themselves c-compatible ? I'm reproducing the c structures exactly with the C types. cint, culong, etc |
19:59:38 | FromGitter | <phdye> .bycopy., I wil try that. |
19:59:39 | leorize | they are as long as you don't use inheritance / dynamic dispatching |
19:59:54 | leorize | C FFI in Nim is done primarily through objects |
19:59:59 | FromDiscord | <Technisha Circuit> Also, is there a way to update nim via nimble? :P |
20:00:12 | leorize | no |
20:00:24 | leorize | use choosenim :P |
20:00:29 | FromDiscord | <Elegant Beef> That's what we have choosenim for |
20:00:32 | leorize | you have nim, should be easy to build choosenim |
20:00:57 | FromDiscord | <Technisha Circuit> I'm trying to use repl.it :p |
20:01:13 | FromDiscord | <Technisha Circuit> It has nim `0.14.2` :p |
20:01:19 | dom96 | or just install choosenim, pre-built binaries exist after all |
20:02:06 | FromDiscord | <Technisha Circuit> How would i do it on repl.it? :P |
20:02:07 | leorize | they are on android |
20:02:14 | leorize | Technisha Circuit: you can't :P |
20:02:16 | FromDiscord | <Technisha Circuit> ? |
20:02:20 | FromDiscord | <Technisha Circuit> Oof |
20:02:32 | FromDiscord | <Technisha Circuit> Repl.it is an x86 ubuntu machine |
20:02:32 | leorize | use the playground? |
20:02:38 | FromDiscord | <Technisha Circuit> (edit) 'Repl.it is an x86 ubuntu machine ... ' => 'Repl.it is an x86 ubuntu machinethough' |
20:02:38 | leorize | we have like the latest nim there |
20:02:45 | FromDiscord | <Technisha Circuit> I want to run a discord bot |
20:02:47 | FromDiscord | <Technisha Circuit> :p |
20:03:01 | leorize | and you want to abuse repl.it for that? |
20:03:11 | leorize | jesus go for a free hosting somewhere |
20:03:39 | leorize | google compute engine got a pretty robust free tier that you can use |
20:05:48 | FromDiscord | <dom96> or just spend $5/month on a DO droplet |
20:06:02 | FromDiscord | <dom96> or if you're a student get credit for free from them |
20:08:49 | FromDiscord | <Technisha Circuit> > and you want to abuse repl.it for that?↵They allow you to do it and I can't use anything that requires a credit card or uses money at all, because my parents won't let me do anything even though I'm 15 :/ |
20:08:59 | FromDiscord | <Technisha Circuit> I even have to hide discord from them |
20:11:06 | leorize | you can run it on your rpi then? :P |
20:11:20 | FromDiscord | <Technisha Circuit> So you think they'll let me host a discord bot? |
20:11:40 | leorize | will they know that you host one? |
20:12:02 | FromDiscord | <Technisha Circuit> It's down rn and I'm hosting stuff for my friend already which makes it a pain |
20:12:10 | FromDiscord | <Technisha Circuit> (edit) 'It's down rn and I'm hosting stuff for my friend already which makes it a pain ... ' => 'It's down rn and I'm hosting stuff for my friend already which makes it a painwhen it's online' |
20:12:30 | leorize | you can go hardcore and host it on your phone :) |
20:12:30 | FromDiscord | <Rika> The free credit thing on certain websites don't need a credit card |
20:12:43 | FromDiscord | <Technisha Circuit> > will they know that you host one?↵My dad was pissed when he found out i was keeping my pi on 24/7 |
20:12:45 | FromDiscord | <Rika> Obviously, because students don't ha e credit cards |
20:12:48 | FromDiscord | <Technisha Circuit> > you can go hardcore and host it on your phone :)↵Disconnects too much |
20:13:10 | FromDiscord | <Technisha Circuit> > The free credit thing on certain websites don't need a credit card↵> Obviously, because students don't ha e credit cards↵Student as in? |
20:13:23 | FromDiscord | <Technisha Circuit> Highschool? College? |
20:13:28 | FromDiscord | <Rika> Students with an edu email |
20:13:34 | FromDiscord | <Technisha Circuit> Don't have that |
20:13:42 | leorize | there was a post on HN with a bunch of free services |
20:13:54 | leorize | maybe you can dig out smt that works there |
20:14:00 | FromDiscord | <Rika> Heroku or smth |
20:14:29 | FromDiscord | <Technisha Circuit> Is this allowed? https://thetechrim.com/get-free-edu-email-2020/ |
20:14:46 | FromDiscord | <Technisha Circuit> > Heroku or smth↵Only lets you run a bot for less then a month |
20:15:01 | FromDiscord | <Rika> Do you need it 24 7 |
20:15:35 | FromDiscord | <Rika> Because I'm pretty sure free won't get you 24 7 |
20:16:09 | FromDiscord | <willyboar> Ask your father to get you a $5 DO. How old he is? |
20:16:26 | FromDiscord | <Rika> I doubt that would work, willy |
20:16:34 | leorize | given how their father don't even let them run a pi overnight |
20:16:36 | FromDiscord | <Rika> His father sounds very strict |
20:16:57 | disruptek | threaten him with covid. |
20:17:06 | leorize | and iirc a pi took barely a watt or two to run |
20:17:17 | FromDiscord | <Technisha Circuit> > Because I'm pretty sure free won't get you 24 7↵Repl works for that with a webserver being pinged every night |
20:17:25 | FromDiscord | <willyboar> I would love my daughter in 5 years to ask me for a $5 DO to play with |
20:17:26 | FromDiscord | <Technisha Circuit> > and iirc a pi took barely a watt or two to run↵Yeah :) |
20:17:30 | FromDiscord | <Technisha Circuit> (edit) ':)' => ':/' |
20:17:44 | sschwarzer | disruptek: probably not helpful ;) |
20:17:44 | leorize | well if your house got a good router you can hack it to run your server (I did :p) |
20:17:56 | sschwarzer | leorize :-D |
20:17:59 | FromDiscord | <Technisha Circuit> What. |
20:18:12 | FromDiscord | <Technisha Circuit> I'm using a Sky Q router :p |
20:18:46 | FromDiscord | <willyboar> disruptek: today is your day off? |
20:19:04 | disruptek | nah, i cannot afford nim anymore. |
20:19:20 | FromDiscord | <willyboar> 😦 |
20:19:39 | FromDiscord | <Elegant Beef> Yea it's sad that nim went for the paid MIT model |
20:19:46 | FromDiscord | <Elegant Beef> 😄 |
20:20:05 | FromDiscord | <Technisha Circuit> What's MIT? A license? |
20:20:18 | FromDiscord | <Elegant Beef> It's a permissive FOSS license |
20:20:22 | FromDiscord | <Technisha Circuit> O |
20:20:42 | FromDiscord | <Technisha Circuit> Sp basically what you can and can't do with the source code for Nim? |
20:20:59 | FromDiscord | <Elegant Beef> Well nim is licensed as MIT, so you can do anything aslong as you give proper attribution |
20:21:11 | FromDiscord | <Technisha Circuit> Oh okay |
20:21:24 | FromDiscord | <Technisha Circuit> But you have to pay for a MIT license? |
20:21:30 | leorize | looks like your router can't do openwrt |
20:21:31 | FromDiscord | <Elegant Beef> No it was a joke |
20:21:37 | FromDiscord | <Technisha Circuit> Oh |
20:21:50 | FromDiscord | <Technisha Circuit> > looks like your router can't do openwrt↵What's that? |
20:22:01 | leorize | a custom linux firmware |
20:22:05 | FromDiscord | <Technisha Circuit> O |
20:22:28 | leorize | if you have a router that supports it you basically got yourself an another linux machine that you can do hosting on :P |
20:22:37 | FromDiscord | <Technisha Circuit> Oo |
20:22:45 | FromDiscord | <willyboar> I think you should ask your father to pay for a server |
20:22:47 | * | tdc quit (Ping timeout: 246 seconds) |
20:22:55 | FromDiscord | <Technisha Circuit> You think he would? |
20:22:56 | FromDiscord | <Rika> I told you |
20:22:57 | lmariscal | https://www.reddit.com/r/nim/comments/gse03n/git_mirror_for_nimble_packages_httpsregnimmoe/ |
20:23:01 | lmariscal | Just wanted to share |
20:23:02 | FromDiscord | <Rika> He likely will not |
20:23:05 | FromDiscord | <willyboar> you can try |
20:23:06 | FromDiscord | <Technisha Circuit> He would ask what for |
20:23:16 | FromDiscord | <willyboar> and then hack everything |
20:23:18 | FromDiscord | <Technisha Circuit> And then i can't tell him because discord |
20:23:21 | leorize | "I want to host my portfolio" :) |
20:23:26 | FromDiscord | <Technisha Circuit> Haha |
20:23:37 | zacharycarter | just steal his credit card |
20:23:49 | FromDiscord | <Technisha Circuit> Oh god, I'm planning on buying an rpi 4b with 8gb ram aswell |
20:23:50 | FromDiscord | <willyboar> tell him you want to make experiments in programming |
20:24:04 | FromDiscord | <Rika> Rpis have 8gb ram??? |
20:24:11 | FromDiscord | <Technisha Circuit> > tell him you want to make experiments in programming↵"Always testing never making money" |
20:24:14 | FromDiscord | <Rika> The future is now, I guess... |
20:24:15 | FromDiscord | <Technisha Circuit> Mhm, new post |
20:24:25 | FromDiscord | <Elegant Beef> The top of the line does |
20:24:38 | FromDiscord | <Rika> Last time I checked it was 4 |
20:24:41 | FromDiscord | <Rika> Not 8 |
20:24:45 | leorize | and yet he lets you own a rpi :P |
20:24:55 | zacharycarter | use the rpi as your discord bot server |
20:25:06 | FromDiscord | <Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/715661953728774214/unknown.png |
20:25:09 | leorize | most of them have wifi so you can just hid it somewhere in your room and he won't turn it off :P |
20:25:32 | codic | XD |
20:25:40 | zacharycarter | I think you should just move out |
20:25:42 | zacharycarter | get your own place |
20:25:50 | zacharycarter | drop out of school - you know do you |
20:25:54 | leorize | the kid is 15, not yet :P |
20:26:03 | sschwarzer | zacharycarter: move out with 15? |
20:26:08 | zacharycarter | sure why not |
20:26:17 | FromDiscord | <Elegant Beef> Hey if you swap the 1 and 5 he's 51 |
20:26:23 | zacharycarter | what are numbers anyway? |
20:26:34 | sschwarzer | Elegant Beef: sounds legit ;) |
20:26:36 | codic | hey if you reverse 001 a 1 year old is 100 |
20:26:44 | FromDiscord | <Elegant Beef> Fact |
20:26:46 | zacharycarter | I mean you're really as old as you feel |
20:27:01 | zacharycarter | I'm 35 and I feel like I'm 135 |
20:27:10 | FromDiscord | <Technisha Circuit> > and yet he lets you own a rpi :P↵@leorize[IRC]#0000 he lets me own a pi but not keep it on as a server |
20:27:13 | sschwarzer | zacharycarter: but maybe he can't convince his father of that ;) |
20:27:17 | FromDiscord | <willyboar> lol i am 38 and i feel like 20 |
20:27:36 | zacharycarter | that's why he needs to move out |
20:27:38 | codic | 38.reverse? you are 83 ;) |
20:27:38 | leorize | @Technisha he can't make you not keep it on if he don't know it's on :) |
20:27:43 | zacharycarter | be all rebellious and shit |
20:27:53 | zacharycarter | f the system |
20:27:58 | zacharycarter | get yoself a discord bot server |
20:28:20 | FromDiscord | <Pixeye> I'm 30 and feel like 30 ) |
20:28:27 | FromDiscord | <Elegant Beef> Holyshit Pixeye! |
20:28:30 | * | konvertex quit (Ping timeout: 260 seconds) |
20:28:31 | zacharycarter | pretty good |
20:28:37 | FromDiscord | <Elegant Beef> You're a nim brethern now! |
20:28:38 | zacharycarter | right on track in fact |
20:28:41 | codic | > he can't make you not keep it on if he don't know it's on :) |
20:28:41 | codic | wait, how would he not know that. raspberry pi's have blinking lights at the firmware level when on :P |
20:28:41 | codic | Used to be diasble-able, not anymore it seems |
20:28:47 | FromDiscord | <willyboar> and if you want to pass the limits get yourself both discord and slack bots |
20:28:56 | codic | wut |
20:28:56 | FromDiscord | <Elegant Beef> *It's beef from the GDL discord pixeye* |
20:28:57 | leorize | codic: well powerline + a drawer |
20:29:04 | sschwarzer | I don't know how old I feel because I don't know how I'd feel at any age not my own. ;-) |
20:29:07 | leorize | wifi took care of the connection |
20:29:09 | leorize | ez |
20:29:15 | codic | leorize: true |
20:29:17 | FromDiscord | <Pixeye> @Elegant Beef glad to see you here : ) |
20:29:25 | zacharycarter | wut is GDL? |
20:29:27 | FromDiscord | <Elegant Beef> Put the rpi inside of your pc case and power it with a 5v line from your PC |
20:29:33 | FromDiscord | <Elegant Beef> It's a game dev discord server |
20:29:39 | zacharycarter | oh |
20:29:41 | FromDiscord | <Elegant Beef> Quite a few of us are here |
20:29:52 | FromDiscord | <Elegant Beef> Gary M for instance i introduced to nim |
20:29:55 | codic | but if you turn on the pc for the power, it'd make noise |
20:30:06 | codic | oh, `GDL` seems cool |
20:30:19 | sschwarzer | What/who is GDL? |
20:30:33 | codic | > <Elegant Beef> It's a game dev discord server |
20:30:37 | FromGitter | <phdye> So, about the static objects, it looks like one must call NimMain() to create them. So they are not statically allocated after all. |
20:30:38 | FromDiscord | <Pixeye> a server where we post about games we make ) |
20:30:39 | FromDiscord | <Elegant Beef> Game Developer League > It's a game dev discord server |
20:30:41 | sschwarzer | ah, right |
20:30:56 | FromDiscord | <Elegant Beef> Nah pixeye i just help noobs in the unity discord |
20:31:04 | codic | nim is just amazing for writing package managers and gtk apps :p |
20:31:08 | FromDiscord | <Elegant Beef> Biding my time until i get a slightly easy non godot 3D engine |
20:31:15 | FromDiscord | <Elegant Beef> (edit) 'Biding my time until i get a slightly easy non godot 3D engine ... ' => 'Biding my time until i get a slightly easy non godot 3D enginein nim' |
20:31:48 | codic | also, um, about the rpi discussion... #nim-offtopic (discord #offtopic)? :p |
20:31:50 | FromDiscord | <Pixeye> well, I finished with Unity framework, hope to finish the game soon in Unity and migrate to nim totally. |
20:32:08 | FromDiscord | <Pixeye> (edit) 'nim' => 'Nim' |
20:32:13 | leorize | @Technisha uh move to #offtopic? :P |
20:32:27 | zacharycarter | Unity framework? like the game engine? |
20:32:31 | FromDiscord | <Elegant Beef> Yea |
20:32:46 | zacharycarter | oh well Nim is not a replacement for Unity just FYI |
20:32:54 | zacharycarter | Nim has nothing like Unity |
20:32:56 | codic | i wish nim had unity bindings |
20:33:04 | sschwarzer | Pixeye: to Nim + Unity or Nim + Godot? |
20:33:27 | FromDiscord | <Elegant Beef> I mean that's why i said biding my time, i dont expect an engine with 1:1 features to unity, just a easy to use 3D renderer that i can do most of the rest myself |
20:33:27 | zacharycarter | Unity doesn't have an API to write bindings for... |
20:33:39 | FromDiscord | <Elegant Beef> Closest you could do is write native libraries |
20:33:44 | FromDiscord | <Pixeye> @Zachary Carter ↵https://github.com/PixeyeHQ/actors.unity - it's just ecs + some stuff for making games in Unity more pleasant : ) |
20:33:52 | zacharycarter | Elegant Beef: I was trying to explain that to Pixeye |
20:33:58 | FromDiscord | <Elegant Beef> Ah |
20:34:00 | FromDiscord | <Elegant Beef> Sorry |
20:34:02 | zacharycarter | np |
20:34:11 | FromDiscord | <Elegant Beef> Pixeye do you do desktop builds often? |
20:34:16 | zacharycarter | Pixeye: yeah but you do realize unity is a game engine and Nim is a programming language right? |
20:34:16 | FromDiscord | <Pixeye> y |
20:34:20 | FromDiscord | <Elegant Beef> <https://github.com/beef331/unity-auto-builder> |
20:34:20 | FromDiscord | <Technisha Circuit> > @Technisha Circuit he can't make you not keep it on if he don't know it's on :)↵I tried that, but i need black tape |
20:34:26 | FromDiscord | <codic> #offtopic |
20:34:31 | FromDiscord | <Pixeye> @Zachary Carter absolutely 🙂 |
20:34:36 | zacharycarter | okay, just making sure :) |
20:34:46 | zacharycarter | i |
20:34:46 | FromDiscord | <Elegant Beef> We both want to move towards a non Unity game engine i assume |
20:34:57 | FromDiscord | <Elegant Beef> Pixeye that can async build projects from git repos |
20:35:12 | FromDiscord | <Elegant Beef> So for my small game jam takes 30 seconds after the inital openning to build win,mac, and linux |
20:35:17 | FromDiscord | <Elegant Beef> opening* |
20:35:45 | FromDiscord | <Elegant Beef> And you have the abillity to automate uploading to platforms or whatever |
20:36:10 | FromDiscord | <Technisha Circuit> My birth dad is gonna buy me an rpi 4b with 8gb, so my stepdad can't really do much |
20:36:40 | FromDiscord | <Elegant Beef> I havent got around to making the itch.io uploader, since I need to look at making archives with nimarchive |
20:36:41 | FromDiscord | <codic> Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah |
20:36:44 | FromDiscord | <codic> #offtopic |
20:36:46 | FromDiscord | <Rika> You okay? |
20:36:49 | FromDiscord | <Pixeye> I'll just try to use nim + opengl + my stuff to make games. I'm not looking for another engine. : ) |
20:36:56 | FromDiscord | <Elegant Beef> We're talking about nim |
20:36:59 | FromDiscord | <Technisha Circuit> @codic stop being extra |
20:37:09 | FromDiscord | <Elegant Beef> Yea im really just looking for a easy to use 3D renderer |
20:37:16 | FromDiscord | <codic> What?↵Also, does unity have nim bindings? |
20:37:20 | FromDiscord | <Elegant Beef> No |
20:37:21 | FromDiscord | <Pixeye> nope |
20:37:28 | FromDiscord | <codic> aw |
20:37:30 | FromDiscord | <Elegant Beef> Unity doesnt have language bindings it's closed source and has no support |
20:37:35 | FromDiscord | <codic> oh |
20:37:36 | FromDiscord | <Elegant Beef> C# or native libraries |
20:37:38 | FromDiscord | <codic> Nvm then |
20:37:53 | FromDiscord | <Recruit_main707> ue4 kind of has! (and its better than unity imo) |
20:38:00 | FromDiscord | <Rika> Fuck unity! |
20:38:03 | FromDiscord | <Elegant Beef> UE4 is owned by epic, you played yourself |
20:38:13 | FromDiscord | <Elegant Beef> UE4 also forces you to use shader nodes to make shaders |
20:38:16 | FromDiscord | <Elegant Beef> So it's shit |
20:39:08 | FromDiscord | <Pixeye> @Elegant Beef btw |
20:39:19 | FromDiscord | <Pixeye> have u heard about beef language ? XD |
20:39:21 | FromDiscord | <Elegant Beef> Yea |
20:39:49 | FromDiscord | <Elegant Beef> Less interested in it since it doesnt have any memory management afaik, and im a lazy arsehole |
20:40:04 | FromDiscord | <Elegant Beef> When this is your only method of writting shaders you've made a grave mistake↵https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/ExpressionReference/Custom/index.html |
20:40:08 | FromDiscord | <Rika> There's always raii |
20:40:15 | FromDiscord | <Pixeye> insane how muuch work was done. |
20:40:34 | FromDiscord | <Elegant Beef> I do love how all the name spaces are direct 1:1 to C# |
20:40:39 | FromDiscord | <Pixeye> ye |
20:40:45 | FromDiscord | <Pixeye> C# is awesome anyway |
20:40:49 | FromDiscord | <Elegant Beef> But i mean i wanted to try a new paradigm and nim is unique from my past experience |
20:41:12 | FromDiscord | <Pixeye> true |
20:41:18 | disruptek | that's kinda how i feel about beastiality. |
20:41:22 | FromDiscord | <Elegant Beef> Lol |
20:41:46 | zacharycarter | don't worry the feeling won't last long |
20:42:02 | FromDiscord | <Elegant Beef> And plus we've got nimscript, so we could use that for gameplay scripting, whenever that get's more seemless |
20:42:25 | FromDiscord | <Elegant Beef> I suppose i more mean for mods |
20:42:26 | FromDiscord | <Elegant Beef> But shh |
20:43:05 | FromDiscord | <Recruit_main707> has someone ever thought of creating some kind of cclass macro that emits actual c++ classes? |
20:43:13 | FromDiscord | <Elegant Beef> Yes, you |
20:43:40 | FromDiscord | <Recruit_main707> ive mentioned it before? 😅 |
20:43:48 | zacharycarter | what for? |
20:44:01 | FromDiscord | <Elegant Beef> You just mentioned it |
20:44:16 | FromDiscord | <Elegant Beef> Uh oh recruit has dementia |
20:44:28 | FromDiscord | <Recruit_main707> > what for?↵for the same reason cpp has classes i guess |
20:44:47 | zacharycarter | I'm not following |
20:45:04 | zacharycarter | if you want to write C++ just write C++? |
20:45:43 | FromDiscord | <Recruit_main707> having *actual* classes could be useful in a lot of ways, there is no special reason |
20:45:56 | FromDiscord | <Elegant Beef> Yet you didnt give a reason |
20:46:04 | FromDiscord | <Recruit_main707> there is none really |
20:46:12 | FromDiscord | <Elegant Beef> So then they couldnt be useful |
20:46:27 | FromDiscord | <Recruit_main707> there is no specific reason |
20:46:40 | FromDiscord | <Elegant Beef> You think they might be useful but you have no reason why to think that |
20:46:47 | FromDiscord | <Elegant Beef> Dont see the flaw in the supporting argument? |
20:46:55 | FromDiscord | <Recruit_main707> its not about an argument |
20:46:59 | * | Vladar quit (Remote host closed the connection) |
20:47:06 | FromDiscord | <Recruit_main707> just a thought |
20:47:26 | FromDiscord | <Elegant Beef> I mean it's an unsubstantiated statement, so i just felt like you needed some supporting reason D: |
20:47:28 | FromDiscord | <Elegant Beef> (edit) 'D:' => '😄' |
20:47:29 | zacharycarter | I'm so confused |
20:47:36 | FromDiscord | <Elegant Beef> Same |
20:48:04 | FromDiscord | <Recruit_main707> lets let it be then |
20:49:32 | FromGitter | <yglukhov> Hey everyone, any emacs users around? Has anyone succeeded using lsp-mode with nimlsp? |
20:50:12 | zacharycarter | maybe krux02 |
20:50:17 | disruptek | hey yuri; krux02 is a resident emacs user. i think kashualmodi, too? |
20:50:19 | zacharycarter | there's another emacs user but I can't remember who |
20:50:27 | zacharycarter | ah yeah kashualmodi |
20:50:54 | * | bjorob quit (Ping timeout: 240 seconds) |
20:51:50 | * | casaca quit (Remote host closed the connection) |
20:52:28 | * | casaca joined #nim |
20:55:13 | * | bjorob_ joined #nim |
20:55:18 | leorize | anyone with some experience on how to efficently navigates C++ code? |
20:55:25 | leorize | I hate inheritance tree so much... |
20:56:40 | FromDiscord | <Elegant Beef> Yea, you change your mind and work on something else |
20:56:43 | FromDiscord | <Elegant Beef> Oh.. just me? |
20:58:18 | zacharycarter | often IDE's ship with some type of outline tool |
20:58:28 | zacharycarter | shows class hierarchies in a tree view |
20:59:11 | zacharycarter | but I mean - this is a reason why OO languages are more difficult to reasona bout |
21:01:25 | * | supakeen quit (Quit: WeeChat 1.9.1) |
21:01:49 | * | supakeen joined #nim |
21:06:22 | FromGitter | <kaushalmodi> leorize: I use ctags for SystemVerilog, but I have heard ctags and similar tools used by C++ coders |
21:06:36 | FromGitter | <kaushalmodi> I use Universal ctags + GNU Global |
21:07:35 | FromGitter | <kaushalmodi> I just searched in Emacs reddit.. folks use rtags/irony for C++ indexing |
21:08:51 | FromDiscord | <mratsim> > has someone ever thought of creating some kind of cclass macro that emits actual c++ classes?↵@Recruit_main707 in the wiki |
21:09:05 | FromDiscord | <Recruit_main707> where? |
21:09:30 | FromDiscord | <mratsim> https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim |
21:09:42 | FromDiscord | <mratsim> warning 2016 |
21:14:13 | skrylar[m] | hoi |
21:18:36 | * | sschwarzer quit (Quit: leaving) |
21:26:37 | * | neceve quit (Ping timeout: 264 seconds) |
21:32:12 | FromDiscord | <Recruit_main707> has someone thought of creating a c2nim like tool using doxygen to get the relevant information from the c/cpp header files? |
21:33:27 | FromGitter | <kaushalmodi> Recruit_main707: nimterop has recently started doing that, for the imported C header files |
21:34:20 | FromDiscord | <Recruit_main707> that will save me a lot of time trying things then :) |
21:35:06 | FromDiscord | <Recruit_main707> thats something promising |
21:38:45 | FromDiscord | <Technisha Circuit> Is it possible to use NodeJS libs in Nim for the js backend? |
21:38:50 | FromDiscord | <Recruit_main707> yes |
21:38:54 | FromDiscord | <Technisha Circuit> How? |
21:39:05 | FromDiscord | <Technisha Circuit> (edit) 'How?' => 'How exactly? Is there any docs for it?' |
21:39:09 | FromDiscord | <Recruit_main707> i know you can, not how :P |
21:39:13 | bung | see document modules for js backend |
21:39:20 | FromDiscord | <Recruit_main707> ye |
21:39:27 | FromDiscord | <Recruit_main707> i think thry mention it there |
21:39:27 | FromDiscord | <Technisha Circuit> Oh okay, thanks :P |
21:39:49 | FromDiscord | <Technisha Circuit> Also, I'm no longer using comic sans as my system font |
21:40:01 | bung | check the source then you can wrap a js lib yourself |
21:40:10 | FromDiscord | <Technisha Circuit> O oki |
21:40:21 | * | Jesin quit (Quit: Leaving) |
21:44:44 | FromDiscord | <Technisha Circuit> The page that should apparently have the info needed doesn't exist anymore |
21:44:46 | FromDiscord | <Technisha Circuit> https://nim-lang.org/backends.html#the-javascript-target |
21:46:07 | bung | https://nim-lang.org/docs/lib.html#pure-libraries-modules-for-js-backend check this section |
21:48:41 | FromDiscord | <Technisha Circuit> Thanks! Found what i needed! |
21:48:53 | leorize | jsffi should get you a long way |
21:48:57 | leorize | and also -d:nodejs |
21:52:04 | * | Jesin joined #nim |
21:55:18 | skrylar[m] | Recruit_main707: i didn't use doxygen for it, but some of my gtk/gdk stuff uses some hand tweaks to the .h files and a peg parser |
21:55:42 | * | xet7 quit (Quit: Leaving) |
22:04:38 | * | idf quit (Ping timeout: 246 seconds) |
22:04:49 | * | casaca quit (Remote host closed the connection) |
22:08:20 | FromDiscord | <Technisha Circuit> Yup |
22:09:25 | FromDiscord | <Technisha Circuit> How would i convert the generated js code to es6? |
22:09:35 | * | casaca joined #nim |
22:09:48 | * | tane quit (Quit: Leaving) |
22:09:48 | FromDiscord | <Technisha Circuit> Is there a way to do it with nim? If not, what tools would i use? |
22:10:08 | FromDiscord | <Technisha Circuit> I'd preferably would like to do it in a script I'm doing |
22:10:43 | FromDiscord | <dom96> why es6? |
22:11:38 | Prestige | I mean there are general JS tools to convert code to differernt targets like babel or webpack but why? |
22:11:51 | leorize | just write nim instead :P |
22:18:40 | * | NimBot joined #nim |
22:23:27 | FromDiscord | <Technisha Circuit> Because I'm writing this for a friend who only knows JS |
22:23:39 | FromDiscord | <Technisha Circuit> And plus, i am just extra for no reason |
22:24:04 | leorize | and you think your friend will want to consume Nim-produced js? :p |
22:24:15 | FromDiscord | <Technisha Circuit> Mhm |
22:24:32 | disruptek | a friend named node. |
22:25:03 | * | zacharycarter quit (Ping timeout: 265 seconds) |
22:25:03 | FromDiscord | <Technisha Circuit> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/715692132848893992 |
22:25:29 | FromDiscord | <Technisha Circuit> I have the require function available now |
22:26:33 | leorize | ix.io glitched so we now hav a link to the discord message |
22:26:45 | leorize | and it want me to login so no :P |
22:28:00 | FromDiscord | <Technisha Circuit> Oof |
22:28:13 | FromDiscord | <Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/715692929301086238/Screenshot_20200528_232804_com.cutthecord.base.jpg |
22:28:30 | FromDiscord | <Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/715693005171982346/Screenshot_20200528_232824_com.termux.jpg |
22:28:42 | leorize | you know dimscord exists right? |
22:28:47 | FromDiscord | <Technisha Circuit> And that's what i have so far |
22:28:52 | FromDiscord | <Technisha Circuit> Ik, this is just a test? |
22:29:03 | FromDiscord | <Technisha Circuit> Also, my friend is an actual person surprisingly |
22:29:15 | leorize | well then basically require() returns a JsObject |
22:29:24 | FromDiscord | <Technisha Circuit> Yeah |
22:29:29 | leorize | store that somewhere and you can start calling functions |
22:29:59 | FromDiscord | <Technisha Circuit> Did that |
22:30:07 | leorize | jsffi should let you do all this without writing a single line of wrapping code |
22:30:12 | FromDiscord | <Technisha Circuit> `let discord = require "discord.js"` |
22:30:16 | leorize | (except for the require` proc |
22:30:35 | FromDiscord | <Technisha Circuit> 'p |
22:30:41 | FromDiscord | <Technisha Circuit> (edit) ''p' => ':p' |
22:32:52 | codic | is there anything like strutils.removePrefix that returns the string instead of modifying it |
22:33:14 | leorize | use sugar.dup |
22:33:25 | codic | what's that? |
22:33:30 | codic | wait, lemme see |
22:33:41 | codic | > Turns an in-place algorithm into one that works on a copy and returns this copy. Since: Version 1.2. |
22:33:45 | codic | that is just epic |
22:35:15 | FromDiscord | <Technisha Circuit> How does sugar.dup work? `dup("abc".removePrefix("a"))`? |
22:35:39 | FromDiscord | <Technisha Circuit> So that would return `bc`? |
22:35:41 | codic | !eval import sugar, algorithm, strutils; var thing="po"; var thing2:string; thing2=thing.dup(thing.removePrefix("p")); echo thing2 |
22:35:44 | NimBot | Compile failed: /usercode/in.nim(1, 93) Error: type mismatch: got <string, string, string> |
22:36:23 | FromDiscord | <Technisha Circuit> Oof |
22:36:36 | codic | !eval import sugar, algorithm, strutils; var thing="po"; var thing2,thing3:string; thing2=thing; thing3.dup(thing2.removePrefix("p")); echo thing3 |
22:36:38 | NimBot | Compile failed: /usercode/in.nim(1, 109) Error: type mismatch: got <string, string, string> |
22:36:51 | codic | um i'm not sure |
22:37:00 | FromDiscord | <Technisha Circuit> Is there any projects to convert Nim code to other languages besides the included ones? |
22:37:01 | leorize | !eval import sugar, strutils; var thing = "po"; let thing2 = thing.dup(removePrefix("p")); echo thing2 |
22:37:04 | NimBot | o |
22:37:27 | leorize | codic: ^ that's how you use it |
22:37:29 | codic | oh |
22:37:33 | codic | Nice |
22:37:34 | leorize | @Technisha not that I know of |
22:37:35 | codic | Thank you |
22:37:41 | codic | That is like the most useful feature I've seen |
22:37:45 | codic | > <Technisha Circuit> Is there any projects to convert Nim code to other languages besides the included ones? |
22:37:47 | FromDiscord | <Technisha Circuit> ~~Like Ruby?~~ |
22:37:48 | FromDiscord | <Technisha Circuit> Oh |
22:37:57 | codic | If you count nlvm as a language...? |
22:38:02 | FromDiscord | <Technisha Circuit> No |
22:38:03 | leorize | funny enough, Nim's 1.2 changelog got better examples on dup than the actual documentation |
22:38:17 | codic | lol |
22:38:17 | codic | @Technisha otherwise no |
22:38:23 | FromDiscord | <Technisha Circuit> Aw |
22:38:30 | codic | Why would you want to anyways |
22:38:39 | FromDiscord | <Technisha Circuit> Because memes |
22:38:41 | codic | You can't have a trade of all jacks |
22:38:42 | codic | Or jack of all trades |
22:38:43 | codic | Or whatever |
22:38:46 | FromDiscord | <Technisha Circuit> (edit) 'memes' => 'i can' |
22:38:52 | FromDiscord | <Technisha Circuit> How about Haxe thoughm |
22:38:56 | codic | You do know, all edits are visible on irc? |
22:38:56 | FromDiscord | <Technisha Circuit> (edit) 'thoughm' => 'though?' |
22:39:01 | FromDiscord | <Technisha Circuit> Ik |
22:39:09 | codic | Haxe wants to target a ton of languages |
22:39:09 | codic | Nim doesn't |
22:39:20 | FromDiscord | <Technisha Circuit> Ik |
22:39:30 | codic | So what about haxe |
22:40:23 | FromDiscord | <Technisha Circuit> There's bound to be people tryna do Nim -> Haxe |
22:41:31 | * | abm quit (Quit: Leaving) |
22:41:36 | codic | why does this fail :\https://hatebin.com/ltnqhfzfci |
22:41:37 | codic | eh |
22:41:42 | codic | not really |
22:41:43 | codic | it's smal |
22:41:46 | codic | * it's small |
22:41:55 | codic | highlight me if you have a reply anyone, gtg |
22:42:24 | leorize | codic: without context there isn't much that I can tell you |
22:42:43 | FromDiscord | <Technisha Circuit> Wait, what happens if an irc user types `a\nb`? |
22:42:49 | leorize | a\nb |
22:43:00 | leorize | things in IRC are sent verbatim |
22:43:11 | leorize | if you means pressing the actual |
22:43:18 | * | kradnoel quit (Read error: Connection reset by peer) |
22:43:35 | leorize | "return" button, then it will be sent as the "return" symbol |
22:43:38 | leorize | really ugly |
22:43:51 | * | kradnoel joined #nim |
22:45:13 | codic | yeah |
22:45:14 | codic | like this? |
22:45:22 | codic | or does matrix split into two msgs |
22:45:28 | FromDiscord | <Technisha Circuit> O |
22:45:48 | leorize | matrix splits |
22:45:53 | codic | leorize: context https://hatebin.com/cfbbfatdqd |
22:46:17 | leorize | what's the error message? |
22:46:38 | codic | lets see |
22:46:45 | codic | OH |
22:46:47 | codic | I didn't import sugar |
22:46:51 | leorize | lol |
22:46:52 | codic | Never mind me |
22:46:57 | codic | COmpiles now |
22:47:00 | leorize | and your algo is a bit inefficient |
22:47:00 | codic | *Compiles |
22:47:04 | FromDiscord | <Elegant Beef> Secondly for nim you should put the code on nim playground |
22:47:15 | codic | true, but this wouldn't execute on play anyways |
22:47:17 | FromDiscord | <Technisha Circuit> How would i do ```client.once("ready", () => {console.log("Ready")});``` in Nim? |
22:47:22 | codic | unless i shared my whole program |
22:47:26 | codic | @technisha hold on |
22:47:30 | codic | gimme a sec |
22:47:33 | leorize | codic: do this: version = line.dup(removePrefix("Version: ")) |
22:47:35 | FromDiscord | <Technisha Circuit> Ok |
22:47:37 | FromDiscord | <Elegant Beef> `proc () = anonymous code here` |
22:47:43 | codic | Oh, I can do that? |
22:47:44 | leorize | then check if version.len == line.len |
22:47:44 | codic | Nice |
22:47:45 | FromDiscord | <Elegant Beef> I believe sugar has a lambda version |
22:47:50 | codic | yes wait |
22:48:02 | codic | @Technisha |
22:48:05 | leorize | the lamda syntax looks stupid imo |
22:48:05 | codic | `client.once("ready", proc () = echo "ready")` |
22:48:13 | codic | or if you like lambdas like me: |
22:48:22 | FromDiscord | <Technisha Circuit> > `proc () = anonymous code here`↵wait you talking to me? |
22:48:25 | codic | `import sugar; client.once("ready", () => echo "ready")` |
22:48:25 | FromDiscord | <Elegant Beef> Yes |
22:48:29 | codic | yes they are |
22:48:29 | FromDiscord | <Technisha Circuit> O |
22:48:30 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2nEw |
22:48:32 | FromDiscord | <Elegant Beef> Example |
22:48:39 | leorize | `client.once("ready") do: echo "ready"` |
22:48:46 | codic | huh? |
22:48:48 | FromDiscord | <Elegant Beef> Ah didnt know of do |
22:48:51 | codic | that a shortcut for anonymous proc? |
22:49:03 | codic | And what about arguments to the lambda? |
22:49:08 | codic | /proc |
22:49:16 | leorize | do (a, b: int) -> return_type: |
22:49:58 | leorize | https://nim-lang.org/docs/manual_experimental.html#do-notation |
22:50:06 | leorize | looks like they moved it to experimental |
22:50:12 | FromDiscord | <Technisha Circuit> Oh? Thanks! |
22:50:15 | leorize | makes sense since it caused a fair share of bugs |
22:57:05 | codic | o |
22:57:09 | codic | noice |
22:57:12 | * | casaca quit (Remote host closed the connection) |
22:58:51 | FromDiscord | <Technisha Circuit> I need to do```javascript let client = new discord.Client()```in Nim, anyone know how? ```nim let client = discord.Client()``` doesn't work |
22:59:20 | codic | pleease don't do multiline codeblocks with triple quotes :\ |
22:59:27 | FromDiscord | <Technisha Circuit> (edit) 'do```javascript let' => 'do```let' | '```nim let' => '```let' |
22:59:39 | codic | At least riot can parse them if you have the backticks on their own line |
22:59:42 | FromDiscord | <Technisha Circuit> That's one message :p |
22:59:49 | codic | No, I mean, you did "```thing```" |
22:59:53 | FromDiscord | <Technisha Circuit> Eh |
22:59:59 | codic | The backticks shouldn't be on the same line |
23:00:06 | codic | Or other markdown parsers can't parse them |
23:00:09 | FromDiscord | <Technisha Circuit> sent a long message, see http://ix.io/2nEx |
23:00:17 | leorize | @Technisha: https://nim-lang.github.io/Nim/jsffi#jsNew%2Cauto |
23:00:19 | codic | Now it's too long for irc |
23:00:27 | codic | But anyways, yup, jsNew |
23:00:36 | FromDiscord | <Technisha Circuit> Oh thanks |
23:00:44 | codic | tho that docs link is old, `jsNew discord.Client()` |
23:00:50 | leorize | I told you, jsffi got nearly everything :P |
23:01:05 | FromDiscord | <codic> Or just do this |
23:01:09 | FromDiscord | <Technisha Circuit> It actually works :P |
23:01:24 | FromDiscord | <codic> Nvm ignore me |
23:01:31 | FromDiscord | <codic> You got a discord bot working? |
23:01:36 | FromDiscord | <Technisha Circuit> Yup |
23:01:38 | FromDiscord | <codic> Oof |
23:01:39 | FromDiscord | <Technisha Circuit> :P |
23:01:44 | codic | That's very sad |
23:01:48 | FromDiscord | <codic> Ignore |
23:01:58 | codic | Me |
23:02:03 | FromDiscord | <codic> Hopping between |
23:02:07 | codic | Discord and Irc/matrix |
23:02:27 | leorize | bridge discord to matrix too and you will only have to join matrix :P |
23:03:10 | * | codic sighs |
23:03:41 | leorize | @Technisha: oh lol jsffi got require() too |
23:04:06 | leorize | you literally don't have to write a single line of js for that example :P |
23:05:20 | FromDiscord | <Technisha Circuit> I did that :P |
23:13:04 | * | kradnoel quit (Remote host closed the connection) |
23:18:44 | skrylar[m] | welp. looks like its time to find a sourcehut replacement. shrugs. |
23:19:47 | FromDiscord | <Technisha Circuit> Is there a way to write pure JS in Nim? |
23:20:20 | FromDiscord | <Technisha Circuit> So everything i can do in ES6 JS, i can do in Nim somehow? |
23:24:39 | FromDiscord | <dom96> {.emit: """ JS HERE """.} |
23:25:32 | FromDiscord | <Technisha Circuit> That has to be in a function, right? |
23:25:36 | FromDiscord | <Technisha Circuit> Or am i wrong? |
23:27:24 | FromDiscord | <dom96> it doesn;t |
23:27:28 | FromDiscord | <dom96> (edit) 'doesn;t' => 'doesn't' |
23:27:51 | FromDiscord | <Technisha Circuit> Oh nice |
23:29:12 | skrylar[m] | i guess its back to github. or see how evil bitbucket/gitlab is |
23:30:33 | FromDiscord | <Technisha Circuit> You could use Codeberg or Gitdab? |
23:30:35 | * | casaca joined #nim |
23:30:42 | FromDiscord | <Technisha Circuit> They use Gitea |
23:30:52 | FromDiscord | <Technisha Circuit> Which is opensource and looks similar to GitHub |
23:31:03 | FromDiscord | <Technisha Circuit> They even have a darkmode |
23:33:06 | FromDiscord | <Technisha Circuit> Also i was looking for a DSL or something that could do that (or a combination of modules that would let me do that in the C backend preferably, if not, then the JS backend) |
23:34:52 | skrylar[m] | yea i dunno yet. i thought it would be nice to have an off-github mirror for durability, but now devault wants to impose license requirements on everyone on srht |
23:35:20 | FromDiscord | <Technisha Circuit> Devalult? |
23:48:00 | FromDiscord | <Avatarfighter> Does the xmlparser library handle mismatched tags? e.g: "<a><h2>test</a></h2>" |
23:50:54 | FromDiscord | <zetashift> The good ol Nim is on HN; case-insensitivity bikeshedding: https://news.ycombinator.com/item?id=23333955 |
23:53:11 | leorize | Avatarfighter: use htmlparser, it can handle that iirc |
23:53:25 | leorize | skrylar[m]: you can move to sourcehut |
23:53:42 | leorize | oh wait sourcehut is imposing license reqs? |
23:54:26 | FromDiscord | <codic> `stdout.styledWrite(fgYellow, &"To install package {debFile} (version {version}) the following dependencies are required: \n{dep.split(", ").join("\n")} \nContinue? ")` Why does this fail to parse |
23:54:57 | skrylar[m] | leorize: they are debating it, so i termed my account |
23:55:11 | skrylar[m] | if i want big tech politicking i will at least get the benefits of big tech |
23:55:20 | skrylar[m] | no point wasting time on small tech doing the same shit |
23:55:31 | leorize | that's sad then |
23:55:49 | leorize | codic: what's the error? |
23:56:13 | FromDiscord | <Avatarfighter> leorize: thanks for the suggestion I kind of forgot htmlparser existed |
23:58:14 | FromDiscord | <codic> Let me see |
23:58:19 | FromDiscord | <codic> /home/codic/coding/nim/soldeb/soldebCli.nim(28, 31) Error: could not parse `dep.split(`.↵/home/codic/.choosenim/toolchains/nim-1.2.0/lib/core/macros.nim(557, 11) Error: expected: ')', but got: '[EOF]' |