00:07:01 | clyybber | good night peeps |
00:07:13 | * | clyybber quit (Quit: WeeChat 2.7.1) |
00:08:06 | FromDiscord | <Recruit_main70007> See ya |
00:15:44 | * | Hideki_ joined #nim |
00:20:21 | * | abm quit (Quit: Leaving) |
00:22:46 | shashlick | the plugins package has been posted - https://github.com/genotrance/plugins |
01:05:00 | * | sentreen_ quit (Ping timeout: 258 seconds) |
01:06:10 | FromDiscord | <Rika> Blessed |
01:13:18 | FromGitter | <Varriount> shashlick: Were you able to figure out that EINT bug? |
01:13:29 | shashlick | nope, no idea on that |
01:13:59 | shashlick | something in my code is generating signals that and interrupting sleeps |
01:14:10 | shashlick | a minimal example does not suffer from it |
01:14:24 | shashlick | https://github.com/genotrance/plugins/blob/master/src/plugins.nim#L82 |
01:14:31 | FromGitter | <Varriount> Hm, are you using any C libraries that Nim program's don't normally use? |
01:14:44 | shashlick | nope this is 100% pure nim |
01:15:23 | * | leorize quit (Ping timeout: 240 seconds) |
01:15:34 | FromGitter | <Varriount> Hm, do you know what signal is being raised? Is there more than one thread? |
01:16:12 | shashlick | there's a main thread and a monitor thread |
01:16:17 | shashlick | i'm sleeping in the monitor thread |
01:16:27 | shashlick | i created the same minimal example and it sleeps fine |
01:16:34 | shashlick | how can I tell what signal is interrupting the sleep? |
01:17:15 | FromGitter | <Varriount> shashlick: Hm, if you're on Linux, or OSX, it might be possible to use dtrace or dtruss |
01:17:41 | FromGitter | <Varriount> If you're on Windows, Process monitor might be able to sniff out the problem |
01:17:45 | shashlick | this is linux, i can try it out |
01:17:55 | shashlick | this was originally written on windows and i think it worked fine there |
01:18:00 | shashlick | can you tell me how to? |
01:18:11 | * | Hideki_ quit (Remote host closed the connection) |
01:18:27 | * | Hideki_ joined #nim |
01:18:37 | * | sentreen_ joined #nim |
01:19:05 | * | leorize joined #nim |
01:19:07 | FromGitter | <Varriount> shashlick: I can help google. |
01:19:15 | FromGitter | <Varriount> Or GDB, gdb might also help too |
01:19:40 | * | Hideki_ quit (Remote host closed the connection) |
01:19:43 | FromGitter | <Varriount> shashlick: https://sourceware.org/gdb/onlinedocs/gdb/Signals.html |
01:19:51 | FromGitter | <Varriount> That looks promising |
01:20:09 | shashlick | nifty, will try |
01:20:10 | FromGitter | <Varriount> You can compile Nim with --debugger:native (or it might be --debug:native) |
01:20:42 | FromGitter | <Varriount> You might need some other options, it's been a while since I've run GDB with Nim |
01:21:29 | shashlick | i've used nim-gdb before so that part should be fine |
01:21:44 | shashlick | hopefully gdb just prints automatically when a signal is raised |
01:23:47 | FromDiscord | <Winton> Hi, All |
01:24:13 | FromDiscord | <Winton> Is it possible to create a program that allows us to password a folder that I can choose? in Nim? |
01:24:38 | FromGitter | <Varriount> shashlick: It looks like you'll need to run `handle all stop print noignore` |
01:24:54 | FromGitter | <Varriount> Winton: Do you mean "password protect" a folder? |
01:25:01 | shashlick | heh - am getting SIGSEGV |
01:25:15 | FromDiscord | <Winton> What I want is to create an encryption for a folder that I have and I have the option of adding this password security. I want to do this simple hobby program and I'm sorry if I'm annoying but I still have 2 weeks using 100% nim |
01:25:27 | FromGitter | <Varriount> shashlick: I suspected that. I take it that the sigsegv handler isn't printing a stack trace? |
01:25:28 | shashlick | with gdb, but runs fine without |
01:25:32 | FromDiscord | <Winton> > <FromGitter> <Varriount> Winton: Do you mean "password protect" a folder? |
01:25:32 | FromDiscord | <Winton> @gitterirc yes |
01:25:39 | shashlick | 0x00007ffff736c522 in GC_find_limit_with_bound () from /usr/lib/x86_64-linux-gnu/libgc.so.1 |
01:26:14 | FromGitter | <Varriount> Hm, perhaps that's intentional? Try continuing and see if another signal is raised. |
01:26:39 | FromDiscord | <Winton> for windows |
01:28:21 | shashlick | Ok brb |
01:29:15 | FromGitter | <Varriount> Winton: Well, there are multiple ways to password protect something |
01:30:41 | FromGitter | <Varriount> Sometimes the OS is able to do it, although usually the owner of the folder isn't prompted for a password (since they own the folder). |
01:31:18 | FromDiscord | <Winton> > <FromGitter> <Varriount> Sometimes the OS is able to do it, although usually the owner of the folder isn't prompted for a password (since they own the folder). |
01:31:18 | FromDiscord | <Winton> @gitterirc haaa Ok |
01:31:28 | FromGitter | <Varriount> You can compress/concatenate the contents of a folder, then encrypt the resulting file. This works across operating systems, however you have to uncompress the file if you want to view the contents. |
01:31:36 | FromDiscord | <Winton> but I imagine that it could be given the form of yes? |
01:32:15 | FromDiscord | <Winton> mostly sometimes we want to put a password to a folder and we could even make this folder also to be deleted password |
01:32:44 | FromGitter | <Varriount> What do you mean by 'deleted' password? |
01:33:42 | FromDiscord | <Winton> I know that with winrar I could but for that I must do what you say compress, but I prefer that this folder load it in some way and get an encryption to access it, it is simply something that occurred to me to do and I came looking for information to see What's up |
01:34:16 | FromGitter | <Varriount> Do you mean you want to be able to access the folder without using a program to decrypt/uncompress it? |
01:34:16 | FromDiscord | <Winton> I mean that to delete the folder, you must also place the key in the same way |
01:34:35 | FromDiscord | <Winton> > <FromGitter> <Varriount> Do you mean you want to be able to access the folder without using a program to decrypt/uncompress it? |
01:34:35 | FromDiscord | <Winton> @gitterirc yes |
01:34:37 | FromDiscord | <Winton> ej.. |
01:34:51 | FromDiscord | <Winton> https://prnt.sc/ra2hea |
01:35:26 | FromDiscord | <Winton> let's say that to this folder only I want access, well that I with my program written in nim just have to refer me to open my program and put the password that I want to have |
01:36:08 | FromDiscord | <Winton> Even only I could have access to my folder and in case of deletion by mistake it could not be done since I would ask the user for the password |
01:36:29 | * | leorize quit (Quit: WeeChat 2.7.1) |
01:36:30 | FromGitter | <Varriount> And what would this program do? What would your actions after using this program look like? |
01:37:25 | FromDiscord | <Winton> > <FromGitter> <Varriount> And what would this program do? What would your actions after using this program look like? |
01:37:25 | FromDiscord | <Winton> @gitterirc what do you mean ? |
01:37:56 | FromGitter | <Varriount> Well, Windows doesn't have a native way to password protect a folder. |
01:38:28 | FromDiscord | <Winton> well the idea is i make this program to protect folders |
01:38:41 | FromDiscord | <Winton> It's like a winrar, just that it would be a folder |
01:38:57 | FromGitter | <Varriount> The output of such a program would have to be a compressed archive (or something similar) that's been encrypted. |
01:39:38 | FromDiscord | <Winton> > <FromGitter> <Varriount> The output of such a program would have to be a compressed archive (or something similar) that's been encrypted. |
01:39:38 | FromDiscord | <Winton> @gitterirc I already understand, well in that case ps should be like winrar I imagine? |
01:39:47 | FromGitter | <Varriount> Yes. |
01:39:56 | FromDiscord | <Winton> 😕 |
01:40:29 | FromDiscord | <Winton> well thank you friend anyway I would like to do it to practice and meet challenges along the way |
01:40:55 | FromDiscord | <Winton> Excuse my tongue, I really speak Spanish |
01:41:06 | FromGitter | <Varriount> Just to be clear, this isn't a limitation with Nim, it's a limitation with Windows. |
01:41:26 | FromDiscord | <Winton> Mmmm |
01:41:31 | FromDiscord | <Winton> Ok |
01:41:41 | FromGitter | <Varriount> Winton: You might want to look at Truecrypt and related programs. |
01:41:48 | FromDiscord | <Winton> I understand, however with Linux is it possible? |
01:42:07 | FromGitter | <Varriount> Hm, possibly with a user-space filesystem |
01:42:08 | FromDiscord | <Winton> > <FromGitter> <Varriount> Winton: You might want to look at Truecrypt and related programs. |
01:42:08 | FromDiscord | <Winton> @gitterirc yes please. |
01:43:02 | FromGitter | <Varriount> Truecrypt can password protect a folder by creating a file which represents a filesystem. Truecrypt can then mount the filesystem when you double-click the encrypted filesystem. |
01:43:15 | FromDiscord | <Winton> > <FromGitter> <Varriount> Just to be clear, this isn't a limitation with Nim, it's a limitation with Windows. |
01:43:15 | FromDiscord | <Winton> @gitterirc the option I have is like compressing the folder to enter the password and manage to do what I am thinking in the same way it may not be the way I was thinking, but if it goes with the same logic of the password and that is what I want to achieve |
01:44:40 | FromGitter | <Varriount> Winton: I would look at compression and encryption libraries. The process would be to compress a folder, then encrypt the compressed folder. |
01:45:50 | FromDiscord | <Winton> Ps if I have that very clear, well a long maybe work awaits me and a lot of research |
01:47:36 | FromDiscord | <Winton> > <FromGitter> <Varriount> Winton: I would look at compression and encryption libraries. The process would be to compress a folder, then encrypt the compressed folder. |
01:47:36 | FromDiscord | <Winton> @gitterirc thanks for the information mate, It has helped me a lot, you are very grateful |
01:57:16 | * | marmotini_ joined #nim |
01:59:43 | * | rockcavera quit (Remote host closed the connection) |
02:01:18 | * | mrgaturus joined #nim |
02:04:33 | mrgaturus | is posible add more enum fields to a defined type using macros? |
02:12:17 | FromGitter | <Varriount> mrgaturus: No. Once a type is defined, it's defined. |
02:12:51 | FromGitter | <Varriount> mrgaturus: Otherwise the compiler would have to repeatedly re-evaluate and check code each time a field was added. |
02:13:57 | * | rockcavera joined #nim |
02:17:34 | * | marmotini_ quit (Remote host closed the connection) |
02:18:07 | * | marmotini_ joined #nim |
02:18:14 | mrgaturus | Varriount: thanks, i see, i tried to create an enum whose fields are defined with a macro that is called in many modules and then generate that enum with another macro |
02:22:37 | * | marmotini_ quit (Ping timeout: 255 seconds) |
02:58:56 | * | endragor joined #nim |
03:00:35 | * | chemist69 quit (Ping timeout: 272 seconds) |
03:02:28 | * | chemist69 joined #nim |
03:08:27 | * | endragor quit (Remote host closed the connection) |
03:09:33 | * | endragor joined #nim |
03:10:09 | * | mrgaturus quit (Quit: WeeChat 2.7.1) |
03:13:18 | FromGitter | <nhanb> I forgot to get back here last weekend but big thanks to leorize and others here for helping me finally compile sqlite statically into my program. I ended up with `gcc -c -DSQLITE_THREADSAFE=0 sqlite3.c -o sqlite3.o`, disabling thread support because my own project doesn't use it and nim compiler would complain otherwise. Got my stuff running flawlessly now. Nim is cool. |
03:15:17 | leorize[m] | np. even better, you can make use of Nim's passC and compile pragma to just do it as part of the project :) |
03:15:46 | * | muffindrake quit (Ping timeout: 240 seconds) |
03:18:06 | * | muffindrake joined #nim |
03:23:12 | * | dddddd quit (Read error: Connection reset by peer) |
03:23:19 | * | endragor quit (Remote host closed the connection) |
03:24:45 | * | endragor joined #nim |
03:28:46 | * | Guest22275 quit (Ping timeout: 240 seconds) |
03:31:01 | * | dadada joined #nim |
03:31:24 | * | dadada is now known as Guest27756 |
04:04:12 | * | fredrik92 quit (Read error: Connection reset by peer) |
04:04:36 | * | fredrik92 joined #nim |
04:09:44 | * | rockcavera quit (Remote host closed the connection) |
04:12:09 | * | fredrik92 quit (Read error: Connection reset by peer) |
04:12:34 | * | fredrik92 joined #nim |
04:21:11 | * | fredrik92 quit (Read error: Connection reset by peer) |
04:21:37 | * | fredrik92 joined #nim |
04:29:57 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
04:36:13 | * | hax-scramper quit (Ping timeout: 258 seconds) |
04:37:07 | * | hax-scramper joined #nim |
04:42:32 | * | hax-scramper quit (Read error: Connection reset by peer) |
04:42:47 | * | hax-scramper joined #nim |
04:45:28 | * | nsf joined #nim |
05:08:43 | * | sagax quit (Remote host closed the connection) |
05:14:38 | FromDiscord | <Elegant Beef> Anyone know how to prevent a control from taking space in an LayoutContainer in nigui? |
05:26:00 | * | hax-scramper quit (Read error: Connection reset by peer) |
05:26:16 | * | hax-scramper joined #nim |
05:46:23 | FromGitter | <Varriount> Put it in another container? |
05:46:30 | * | leorize joined #nim |
05:46:51 | FromGitter | <Varriount> ( I haven't used nigui, but that's how it's done in other programs) |
05:48:09 | * | fredrik92 quit (Read error: Connection reset by peer) |
05:48:34 | * | fredrik92 joined #nim |
05:55:07 | FromGitter | <Varriount> Elegant Beef: What are you making? |
05:55:20 | FromDiscord | <Elegant Beef> An updater for a game |
05:55:42 | FromDiscord | <Elegant Beef> Drawing an image as the background but it takes space and would prefer if the buttons were overtop the image |
05:56:04 | leorize | if it's the background wouldn't everything be on top of it? |
05:56:12 | FromDiscord | <Elegant Beef> That's the point |
05:57:45 | FromDiscord | <Elegant Beef> Atleast the only way i see to draw an image is with a control, which is taking space so i can draw the image |
06:12:25 | * | letto joined #nim |
06:23:40 | * | fredrik92 quit (Read error: Connection reset by peer) |
06:24:06 | * | fredrik92 joined #nim |
06:50:19 | * | hax-scramper quit (Read error: Connection reset by peer) |
06:50:42 | * | hax-scramper joined #nim |
07:10:57 | * | narimiran joined #nim |
07:25:39 | * | fredrik92 quit (Read error: Connection reset by peer) |
07:25:44 | FromDiscord | <Lantos> ^.^ I did it managed to send mail with nim |
07:25:44 | FromDiscord | <Lantos> https://play.nim-lang.org/#ix=2d9h |
07:25:45 | FromDiscord | <Lantos> follow up from Friday. |
07:26:07 | * | fredrik92 joined #nim |
07:32:06 | * | solitudesf joined #nim |
07:42:28 | * | PMunch joined #nim |
07:49:15 | * | clemens3 quit (Quit: WeeChat 2.7) |
07:49:27 | * | disbot quit (Ping timeout: 240 seconds) |
07:49:55 | * | disruptek quit (Ping timeout: 260 seconds) |
07:51:42 | * | disruptek joined #nim |
07:52:10 | * | disbot joined #nim |
07:56:06 | * | jjido joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:19 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:03:07 | * | nc-x79 joined #nim |
08:03:11 | FromGitter | <Varriount> Lantos: Great job! |
08:04:51 | * | gmpreussner joined #nim |
08:05:50 | * | nc-x79 quit (Remote host closed the connection) |
08:08:26 | * | solitudesf quit (Ping timeout: 240 seconds) |
08:22:04 | * | Vladar joined #nim |
08:34:02 | * | inv2004 joined #nim |
08:37:01 | inv2004 | Hello, month ago I was trying to use alaviss/nim.nvim on windows without success, but it was not a problem, because vs-code worked fine |
08:37:36 | inv2004 | today, I decided to try linux again, I have fresh neovim, see that plugin, but I do not see 1) any syntax highlight |
08:38:09 | inv2004 | and goto-definition does not work across files also |
08:41:12 | * | dwdv joined #nim |
08:45:44 | inv2004 | Just checked - autocomplete is also strange if it works |
08:46:06 | * | floppydh joined #nim |
08:51:24 | lqdev[m] | ping leorize |
08:55:14 | * | marmotini_ joined #nim |
09:02:15 | inv2004 | Yes, it is a bit strange - before it was windows, but now I did only few steps which described in instruction |
09:02:35 | inv2004 | do not think it is the plugin problem, maybe something else |
09:10:50 | * | uvegbot quit (Ping timeout: 256 seconds) |
09:17:46 | * | uvegbot joined #nim |
09:23:34 | * | marmotini_ quit (Remote host closed the connection) |
09:24:11 | * | marmotini_ joined #nim |
09:24:42 | FromGitter | <timotheecour> anywaones wants to merge https://github.com/nim-lang/Nim/pull/13555 to un-break nim CI? |
09:24:44 | disbot | ➥ fix broken nim CI, disable blscurve |
09:24:56 | FromGitter | <timotheecour> *anyone |
09:26:58 | FromGitter | <sheerluck> Araq released this 20 minutes ago: `2020-03-02-devel-22d1ba4` nightly build -- and there's no `nim-1.1.1-linux_arm64.tar.xz` Something happend with `nim-1.1.1-linux_arm64.tar.xz` last one is 7 days ago :( |
09:27:57 | narimiran | i'm looking into it |
09:28:58 | * | marmotini_ quit (Ping timeout: 256 seconds) |
09:31:10 | * | krux02 joined #nim |
09:35:27 | * | marmotini_ joined #nim |
09:40:00 | * | marmotini_ quit (Remote host closed the connection) |
10:07:54 | FromGitter | <kristianmandrup> I have ES6 imports working for JS gen. Made some extensions to the JS generator engine that makes it a lot more powerful. Still experimental. |
10:08:06 | * | clemens3 joined #nim |
10:09:10 | Araq | nice |
10:09:16 | Araq | did you fix your RFC? |
10:09:49 | * | inv2004 quit (Remote host closed the connection) |
10:15:27 | * | clemens3 quit (Read error: No route to host) |
10:17:41 | * | clemens3 joined #nim |
10:18:39 | FromDiscord | <mratsim> @timotheecour, looking |
10:20:14 | FromGitter | <Lecale> Hello Gitter. Does anyone know the answer to https://stackoverflow.com/questions/60472920/how-to-call-string-function-in-dotnet-core-with-impotdll-in-nim-lang |
10:22:28 | FromGitter | <Lecale> I found it hard to find a starting place to learn about this topic |
10:27:27 | Araq | [DllImport("HelloNim.dll")] |
10:27:27 | Araq | public static extern string HelloNim(int a, int b); |
10:27:44 | Araq | I suspect it's not a 'string' here ;-) |
10:28:58 | FromGitter | <Lecale> What do you suspect it to be? |
10:30:57 | FromGitter | <melMass> Is there a list of Nim reserved keywords ? It seems that `debug` is reserved ? |
10:31:00 | * | abm joined #nim |
10:31:22 | Araq | https://docs.microsoft.com/de-de/cpp/dotnet/how-to-convert-char-star-string-to-system-byte-array?view=vs-2019 |
10:33:19 | Araq | https://docs.microsoft.com/de-de/cpp/dotnet/how-to-marshal-strings-using-pinvoke?view=vs-2019 |
10:33:29 | Araq | you might need to write some C |
10:33:34 | Araq | ++ interop code? |
10:33:47 | FromDiscord | <mratsim> @timotheecour: replied https://github.com/status-im/nim-blscurve/issues/39#issuecomment-593334197, basically many issues: 1. nimyaml cannot be installed anymore from the original repo, 2. Nimble doesn't allow installing from an alternate repo as requirement, 3. Nimble doesn't allow task-level dependencies |
10:33:49 | disbot | ➥ nim CI broken: eth2_vectors.nim(17, 3) Error: cannot open file: yaml ; snippet at 12https://play.nim-lang.org/#ix=2d9V |
10:34:39 | FromDiscord | <mratsim> so currently all code that requires NimYAML should be commented out from the Nim important packages test unless you use Status alternative nimyaml |
10:34:55 | FromDiscord | <mratsim> which has a fix for the git mess |
10:38:01 | * | marmotini_ joined #nim |
10:38:17 | FromGitter | <Lecale> Having to learn some C++ rather increases the complexity of task. But maybe calling with char array and using Marshall.Copy can work. It looked very simple when you just had an example with a cint |
10:40:57 | Araq | melMass: 'debug' is not reserved |
10:41:09 | Araq | the list of keywords can be found in the manual |
10:42:22 | Araq | https://stackoverflow.com/questions/30887551/net-interop-how-to-get-returned-string-not-null-terminated-from-unmanaged-dl |
10:42:32 | Araq | [DllImport("D:\\ca\\TextAccessLibrary.dll", CallingConvention = CallingConvention.Cdecl)] |
10:42:32 | Araq | static extern IntPtr GetText(); |
10:42:43 | Araq | you need 'IntPtr' as the return type |
10:43:15 | Araq | oh wait |
10:43:58 | Araq | 'string' is supposed to work? |
10:44:13 | Araq | who knows, C# interop is so weird, full of magic that sometimes works |
10:45:10 | Araq | https://limbioliong.wordpress.com/2011/06/16/returning-strings-from-a-c-api/ |
10:46:11 | krux02 | Araq: Can you review my PR here: https://github.com/nim-lang/Nim/pull/13536 |
10:46:13 | disbot | ➥ fix operators containing percent for VM usage |
10:46:41 | * | lritter joined #nim |
10:47:05 | FromGitter | <Lecale> Some fun to be had |
11:04:45 | * | sagax joined #nim |
11:13:47 | FromGitter | <melMass> @Araq, thanks, strange then, I'll investigate further. |
11:14:06 | FromGitter | <melMass> Is there an `OR` type in nim |
11:14:29 | FromGitter | <melMass> ```LogStyle = object ⏎ fg:LogColor|ColorRGB ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5e5cea94ec7f8746aaaa061c] |
11:14:37 | FromGitter | <melMass> Something like that |
11:14:39 | * | fredrik92 quit (Read error: Connection reset by peer) |
11:15:07 | * | fredrik92 joined #nim |
11:23:25 | FromGitter | <melMass> Lastly (sorry but I'm reviving my rusty nim knowledge) |
11:23:45 | FromGitter | <melMass> How to handle implicit type conversion, in the manual: |
11:23:46 | FromGitter | <melMass> https://nim-lang.org/docs/tut2.html#object-oriented-programming-type-conversions |
11:24:17 | FromGitter | <melMass> I don't understand the expected signature from `destination_type(expression_to_convert)` |
11:24:55 | FromGitter | <alehander92> there is `or` type |
11:25:05 | FromGitter | <melMass> ```proc toColorRGB*(this:LogColor):ColorRGB = ⏎ case this ⏎ of BLACK: return rgb(1,1,1)``` ⏎ ⏎ This does not implicitly convert LogoColor to ColorRGB [https://gitter.im/nim-lang/Nim?at=5e5ced11ec7f8746aaaa0b42] |
11:25:08 | FromGitter | <alehander92> operator for types* |
11:25:14 | FromGitter | <alehander92> but it produces a generic type |
11:25:33 | FromGitter | <alehander92> so sometimes effects of that are not expected by the programmer |
11:26:53 | FromGitter | <melMass> @alehander92 Thanks, I get the same error, `Is not a concrete type` but that's my fault, one is a type the other is an enum... I'm quite new to nim type system |
11:27:07 | FromGitter | <alehander92> no, the problem is that LogStyle seems as a normal non-generic type |
11:27:25 | FromGitter | <alehander92> but you add a generic non-concrete field: at least thats what i think, i might be wrong |
11:28:06 | FromGitter | <alehander92> usually we use something like ADT-s (similar to adt-s in functional langs or enums in rust): case objects |
11:28:33 | FromGitter | <melMass> The generic field being the `or` right ? |
11:28:35 | FromGitter | <alehander92> i'd say A | B is mostly useful for generic procedures arg types |
11:28:38 | FromGitter | <alehander92> yes |
11:29:19 | FromGitter | <alehander92> so basically you'd either make LogStyle generic based on T: being LogColor or ColorRGB or something else |
11:29:23 | FromGitter | <melMass> Ok I understand, I should rethink it with a generic type |
11:29:40 | FromGitter | <alehander92> or you would just make a more general case object which is something like an union |
11:30:28 | FromGitter | <melMass> You can use case in type declaration ? |
11:30:34 | * | m4r35n357 quit (Quit: Ex-Chat) |
11:31:10 | FromGitter | <melMass> Thanks for the clarification about generic ! |
11:31:36 | FromGitter | <alehander92> <3 |
11:31:55 | FromGitter | <melMass> Do you know about implicit conversion by any chance ? |
11:32:24 | FromGitter | <alehander92> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
11:32:29 | FromGitter | <alehander92> they are very useful |
11:32:45 | FromGitter | <alehander92> do you work with any other static languaghe? to make it easier to show you a parallel |
11:33:56 | FromGitter | <alehander92> afaik yes |
11:33:57 | FromGitter | <melMass> C++ and Haxe mainly |
11:34:02 | FromDiscord | <kodkuce> arc stable now? |
11:34:03 | FromGitter | <alehander92> implicit convertion can happen with `converter` |
11:34:11 | FromGitter | <melMass> That's so powerful thanks |
11:34:27 | FromGitter | <alehander92> you just define one from A to B and it takes part in |
11:34:32 | FromGitter | <alehander92> function overloading later |
11:34:42 | FromGitter | <alehander92> e.g. converter a(a: A): int = a.field |
11:35:03 | FromGitter | <alehander92> var a: A ... a + 5 |
11:35:17 | FromGitter | <alehander92> IIRC |
11:35:54 | FromGitter | <alehander92> explicit overloading is about e.g. 5.float => 5.0, 4.StudentID =>StudentID(4) etc |
11:36:06 | FromGitter | <alehander92> i think its mostly about OOP and distinct/enum/int types |
11:36:48 | FromGitter | <melMass> <3 <3 <3 It works !!! |
11:36:51 | FromGitter | <alehander92> i'd say case objects can be very similar to https://code.haxe.org/category/beginner/enum-adt.html if you use them in that way |
11:37:04 | * | marmotini_ quit (Remote host closed the connection) |
11:39:05 | FromDiscord | <Rika> i still dont know how to name a proc that would convert a type into another type |
11:39:10 | FromDiscord | <Rika> rather, the naming convention |
11:39:14 | FromDiscord | <Rika> *is unclear |
11:39:31 | FromGitter | <melMass> @alehander92 Fun that you mention Haxe enums, I actually was thinking of the problem with an Haxe mind which I think don't fit in that case, I have an enum of predefined colors: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ And wanted like a CUSTOM key with rgb values [https://gitter.im/nim-lang/Nim?at=5e5cf073ec7f8746aaaa13e8] |
11:40:40 | FromGitter | <kristianmandrup> @Araq I'll wrap it up and then finish the RFC, following your advice |
11:42:46 | * | narimiran quit (Ping timeout: 240 seconds) |
11:44:03 | * | floppydh quit (Ping timeout: 240 seconds) |
11:45:14 | FromGitter | <alehander92> @melMass ok, but then why would you have an enum, if one can have a continuum of different possible values there |
11:45:31 | FromGitter | <alehander92> you can just have const blackColor etc |
11:45:39 | FromGitter | <alehander92> which is of the RgbColor type |
11:46:50 | FromGitter | <alehander92> if you want to have only those available at some place, you can still have both types i guess, but have a converter indeed |
11:47:16 | FromGitter | <alehander92> which can use an `array[LogColor, RgbColor]` |
11:47:23 | * | m4r35n357 joined #nim |
11:47:39 | FromGitter | <alehander92> arrays in nim can be indexed by enums as well |
11:48:50 | FromGitter | <melMass> I went the converter way, doing the case test there and returning the right color for that specific case, but thanks for all the extras very useful informations |
11:49:01 | FromGitter | <alehander92> btw if you're working on a logging library, i'd point you to the libs like https://nim-lang.org/docs/logging.html and https://github.com/status-im/nim-chronicles/ |
11:49:29 | * | marmotini_ joined #nim |
11:49:29 | FromGitter | <alehander92> of course, if you want to build something different, go ahead just letting you know of the existing dsl-s |
11:50:40 | FromGitter | <alehander92> yeah just saying that array might be simpler as you just right ⏎ `var a: array[LogColor, RgbColor] = [rgb(...), rgb(..), ..]` and then `a[arg]` |
11:51:15 | FromGitter | <alehander92> no problem |
11:53:31 | FromGitter | <melMass> Thanks again :), Logging libraries are my "Todo App" for new languages, it's just to try the type system and how to handle cases I'm well aware of in other languages. I've stopped using Nim a year ago because of the lack of time I had. Since then I wrote a lot of Haxe programs (Sys target) and felt frustrated by all the abstractions I have to go to, to use native libraries, I still love Haxe very much but I find in Nim |
11:53:31 | FromGitter | ... exactly what I miss in Haxe |
11:55:44 | * | nsf quit (Ping timeout: 256 seconds) |
11:56:23 | * | nsf joined #nim |
11:59:18 | FromGitter | <alehander92> ah ok! |
11:59:26 | FromGitter | <alehander92> yeah haxe is interesting to me |
11:59:46 | FromGitter | <alehander92> as i wanted to do something kinda similar back then, but i also find it a bit harder to use one lang for so many targets |
11:59:58 | FromGitter | <alehander92> nim is ok for me with C/javascript target fo rnow |
12:02:23 | FromGitter | <melMass> @alehander92 also the nimpy project is very interesting |
12:05:58 | FromDiscord | <Rika> i'd use nim more if it had more machine learning helpers XD (i only use them, i'm not capable of writing them) |
12:07:08 | FromDiscord | <Recruit_main70007> i also think nim needs more, i was unable to install neither of the 2 we have |
12:10:37 | * | rockcavera joined #nim |
12:15:14 | PMunch | @Lantos, wouldn't it be easier to use the SMTP module? https://nim-lang.org/docs/smtp.html |
12:30:43 | * | marmotini_ quit (Remote host closed the connection) |
12:31:18 | * | marmotini_ joined #nim |
12:35:59 | * | marmotini_ quit (Ping timeout: 260 seconds) |
12:44:56 | * | marmotini_ joined #nim |
12:44:56 | * | solitudesf joined #nim |
12:46:00 | * | endragor quit (Remote host closed the connection) |
12:54:05 | * | kungtotte quit (Read error: Connection reset by peer) |
12:54:26 | * | uvegbot quit (Ping timeout: 240 seconds) |
12:54:36 | * | kungtotte joined #nim |
12:57:17 | * | rockcavera quit (Remote host closed the connection) |
13:00:20 | * | hax-scramper quit (Ping timeout: 256 seconds) |
13:01:02 | * | hax-scramper joined #nim |
13:01:21 | * | uvegbot joined #nim |
13:02:30 | * | rockcavera joined #nim |
13:07:15 | * | nsf quit (Quit: WeeChat 2.7) |
13:13:21 | * | Kaivo joined #nim |
13:18:01 | * | marmotini_ quit (Remote host closed the connection) |
13:18:37 | * | marmotini_ joined #nim |
13:19:19 | FromGitter | <melMass> Is there a way to use a pragma only if a compilation define has been set ? |
13:20:40 | FromGitter | <melMass> ```proc myProc*() ⏎ when defined(foo): ⏎ {.bar.} ⏎ = ⏎ return true``` [https://gitter.im/nim-lang/Nim?at=5e5d0827ca2f5a558d5ee1b0] |
13:21:53 | PMunch | Hmm if you have a string in Nim code, and then do "return cstring(myString)" does that copy the Nim string? Who is responsible for clearing that memory? |
13:22:44 | lqdev[m] | @melMass create a custom pragma in a when, like: when defined(foo): {.pragma: bar, importc.} else: {.pragma: bar, exportc.} |
13:22:47 | lqdev[m] | @melMass create a custom pragma in a when, like: when defined(foo): {.pragma: bar, importc.} else: {.pragma: bar, exportc.} |
13:23:13 | * | marmotini_ quit (Ping timeout: 255 seconds) |
13:24:14 | FromGitter | <melMass> @PMunch whoever calls it no ? |
13:24:44 | PMunch | Well it depends on what happens to the underlying string |
13:25:11 | leorize[m] | lqdev: you pinged? |
13:25:21 | PMunch | If the cstring is just a pointer to the buffer of the string the Nim GC will take care of it (and you must copy the string into the calling code before calling anything else in the Nim code). |
13:25:40 | PMunch | But I'm not sure if there is a chance it would get cleared before returning in that case.. |
13:26:04 | lqdev[m] | leorize: yes, a guy was having some problems setting up nim.nvim |
13:26:21 | lqdev[m] | see history for details |
13:27:02 | * | clyybber joined #nim |
13:27:51 | leorize[m] | yea, they left irc though |
13:28:03 | FromDiscord | <mratsim> @Rika, what kind of ML are you doing? |
13:30:31 | clyybber | lqdev[m]: Btw, shashlick made his plugin thing a package |
13:31:06 | FromDiscord | <Rika> mratsim, i'm not doing anything special really, but it's classification using gradient boosting |
13:31:23 | FromDiscord | <Rika> (note that i'm not in college yet) |
13:34:16 | * | marmotini_ joined #nim |
13:35:32 | FromDiscord | <mratsim> well 2 years ago I'm pretty sure no one had courses in gradient boosting 😉 |
13:36:56 | FromDiscord | <mratsim> wrapping xgboost or lightgbm shouldn't be too hard (except the install instructions) but I'm not too sure on the dataframe format in NimData and how compatible it is with those |
13:38:52 | * | marmotini_ quit (Ping timeout: 256 seconds) |
13:38:52 | FromGitter | <alehander92> @melMass your pragma can simply check the defined itself, maybe |
13:39:06 | FromGitter | <alehander92> pragma implementation* if its a macro |
13:39:19 | * | marmotini_ joined #nim |
13:39:57 | lqdev[m] | clyybber: good to know, I'll check it out |
13:40:41 | FromGitter | <melMass> @lqdev thanks that's it ! @alehander92 I'm using a pragma from an external lib but wrapping it myself as suggested works nicely |
13:40:55 | FromDiscord | <Rika> i see *eyes blindfolded* |
13:42:04 | shashlick | Still fighting the CI and some minor issues but ya, it's getting there |
13:42:20 | shashlick | !repo plugins |
13:42:22 | disbot | https://github.com/ThomasTJdev/nimwc_plugins -- 9nimwc_plugins: 11Plugin repository for Nim Website Creator 15 4⭐ 0🍴 7& 29 more... |
13:42:27 | shashlick | Meh |
13:42:42 | FromDiscord | <Rika> wrong plugin repo? |
13:42:44 | FromDiscord | <Rika> lmao |
13:42:54 | shashlick | !repo genotrance/plugins |
13:42:55 | disbot | https://github.com/genotrance/plugins -- 9plugins: 11Plugin system for Nim 15 1⭐ 0🍴 |
13:43:04 | FromGitter | <melMass> :( |
13:43:24 | FromDiscord | <Rika> no cutlery yet |
13:43:26 | FromGitter | <melMass> It's not a pragma but a macro, I did not know you could use macro like pragmas |
13:43:39 | FromDiscord | <Rika> pragmas are just macros technically |
13:44:37 | * | solitudesf quit (Remote host closed the connection) |
13:44:56 | FromGitter | <melMass> Oh I see, but it seems I cannot use that with a macro ⏎ ⏎ ```{.pragma: bar, mymacro.}``` [https://gitter.im/nim-lang/Nim?at=5e5d0dd853fa513e28649b81] |
13:45:06 | * | Hideki_ joined #nim |
13:46:26 | FromGitter | <melMass> I'm getting ⏎ ⏎ ```Error: invalid pragma: mymacro``` [https://gitter.im/nim-lang/Nim?at=5e5d0e327fef7f2e8997487d] |
13:49:43 | FromDiscord | <Rika> theres a certain syntax to conform to which i cannot recall |
13:52:32 | shashlick | http://nim-lang.github.io/Nim/manual.html#macros-macros-as-pragmas |
13:53:39 | * | fredrik92 quit (Read error: Connection reset by peer) |
13:53:52 | shashlick | http://nim-lang.github.io/Nim/manual.html#pragmas-pragma-pragma |
13:54:04 | * | fredrik92 joined #nim |
13:56:01 | FromGitter | <Lecale> After upgrading to 1.0.6 I have a Nim_and_C_compiler_disagree_on_target_architecture message |
13:56:16 | FromDiscord | <Rika> thats one hell of an anchor |
13:56:23 | FromDiscord | <Rika> "pragmas-pragma-pragma" |
14:06:43 | FromGitter | <alehander92> @melMass but what are you trying to do |
14:06:43 | shashlick | Lecale: how did you upgrade |
14:06:59 | FromGitter | <alehander92> usually you define macro mymacro(function: untyped): untyped = .... |
14:07:04 | FromGitter | <alehander92> and then use {.mymacro.} |
14:08:05 | * | Hideki_ quit (Read error: Connection timed out) |
14:08:28 | FromGitter | <alehander92> ah i just now got what `{.pragma.}` does: its just like a shortcut for reusing a set of other pragmas |
14:08:48 | * | Hideki_ joined #nim |
14:08:58 | FromGitter | <alehander92> so you're writing "when i use {.bar.} this should be actually {.mymacro.}" so you still need mymacro def |
14:11:44 | clyybber | alehander92: Its also useful to make noop pragmas |
14:11:50 | clyybber | that are like annotations |
14:11:58 | clyybber | that you can check for in macros |
14:15:56 | FromGitter | <melMass> @Rika thanks a lot this is it, I think I'm going to print the whole manual :D |
14:16:41 | FromDiscord | <Rika> hahaha |
14:17:03 | FromDiscord | <Rika> i'd load it onto my e-reader but that's me |
14:17:55 | FromGitter | <alehander92> clyybber yes that makes sense |
14:19:30 | * | marmotini_ quit (Remote host closed the connection) |
14:20:05 | * | marmotini_ joined #nim |
14:24:38 | * | marmotini_ quit (Ping timeout: 258 seconds) |
14:27:07 | * | chemist69 quit (Ping timeout: 272 seconds) |
14:27:55 | * | chemist69 joined #nim |
14:30:26 | * | hax-scramper quit (Ping timeout: 240 seconds) |
14:31:03 | * | hax-scramper joined #nim |
14:32:24 | m4r35n357 | hi guys, math library question, can't seem to access either of these fucntions: https://nim-lang.org/docs/sums.html |
14:32:37 | m4r35n357 | Error: undeclared identifier: 'sumPairs' |
14:32:43 | m4r35n357 | same for the other one |
14:32:54 | m4r35n357 | I have import math, of course |
14:33:33 | FromDiscord | <Rika> m4r35n357 how are you using it? |
14:33:52 | m4r35n357 | hold on . . . |
14:34:24 | m4r35n357 | https://play.nim-lang.org/#ix=2daV |
14:35:22 | FromDiscord | <Rika> `import std/sums` |
14:35:39 | FromDiscord | <Rika> it's `monotimes` all over again |
14:36:58 | m4r35n357 | hmm, that compiles, thanks |
14:37:37 | m4r35n357 | si I get math math for free ;) |
14:37:53 | m4r35n357 | but I have to specify math std/sums |
14:37:58 | m4r35n357 | aaargh! |
14:38:28 | clyybber | Rika: WDYM? |
14:38:51 | clyybber | because peeps expected monotimes to exist when importing times? |
14:38:59 | m4r35n357 | well I am using math functions already, at the same level of hierarch (in the docs) as the sums |
14:39:09 | m4r35n357 | but I don't have to import math/math |
14:39:33 | clyybber | m4r35n357: Oh, but its not math/sum |
14:39:35 | clyybber | its just sums |
14:39:54 | clyybber | m4r35n357: Its not part of the math module |
14:40:05 | m4r35n357 | I know, it is working, but it seem sillogical |
14:40:06 | clyybber | not really |
14:40:06 | m4r35n357 | I just made up a word |
14:40:06 | clyybber | its just a module in the stdlib |
14:40:30 | m4r35n357 | yes, math and std/sums are in the same section in the docs, yes? |
14:40:31 | * | xet7 quit (Quit: Leaving) |
14:41:00 | m4r35n357 | they both say to import math |
14:41:00 | clyybber | no |
14:41:01 | clyybber | they say they import math |
14:41:01 | m4r35n357 | but one works, and dthe other does not |
14:41:05 | clyybber | they don't tell you that you have to import math |
14:41:05 | m4r35n357 | aaaargh agqain then! |
14:41:14 | FromDiscord | <Rika> clyybber: its not clear that you need to indicate std/ to import monotimes |
14:41:43 | m4r35n357 | I got the math functions to work by appliying the import at the top of the section |
14:41:44 | * | xet7 joined #nim |
14:41:46 | FromDiscord | <Rika> the module imports math, it doesnt export it though |
14:41:56 | m4r35n357 | but I had to ask on IRC to get the sums working |
14:42:00 | FromDiscord | <Rika> nor does it say that it's imported by math |
14:42:20 | * | NimBot joined #nim |
14:52:58 | * | Zevv quit (Ping timeout: 260 seconds) |
14:54:35 | * | Zevv joined #nim |
14:54:36 | * | Zevv quit (Changing host) |
14:54:36 | * | Zevv joined #nim |
14:54:56 | clyybber | Zevv casually joining via an ads server |
15:00:37 | Zevv | ads server? |
15:00:56 | Zevv | why&how? |
15:01:15 | Zevv | My internet just dropped out because of service updates and my irssii reconnected? |
15:07:21 | clyybber | oh, yeah I'm stupid |
15:07:23 | clyybber | it was your isp |
15:07:28 | clyybber | its domain said ads1 |
15:08:34 | * | Vladar quit (Quit: Leaving) |
15:08:44 | * | Hideki_ quit (Remote host closed the connection) |
15:09:01 | leorize | it said adsl btw :P |
15:09:11 | leorize | you should use a better font :) |
15:15:57 | * | marmotini_ joined #nim |
15:17:49 | * | marmotin_ joined #nim |
15:18:50 | Zevv | zevv-peep! |
15:19:19 | FromGitter | <Varriount> Zevvvvvvv |
15:19:19 | * | PMunch quit (Quit: Leaving) |
15:19:29 | clyybber | leorize: Huh, I said ads1 |
15:19:39 | clyybber | oh damn |
15:19:47 | clyybber | lol |
15:19:53 | Zevv | the funny thing is, I'm not on ADSL |
15:20:07 | clyybber | adsl.xs4all |
15:20:11 | Zevv | I'm on fiber |
15:20:14 | clyybber | huh |
15:20:14 | Zevv | they lie |
15:20:16 | clyybber | weird |
15:20:18 | Zevv | everybody lies |
15:21:07 | * | marmotini_ quit (Ping timeout: 255 seconds) |
15:22:56 | FromGitter | <kaushalmodi> dr house |
15:23:06 | * | nsf joined #nim |
15:23:17 | Zevv | it's never lupus as well |
15:23:50 | FromGitter | <kaushalmodi> I'm rewatching season 1 on netflix and still like the show.. can't believe it was made more than a decade ago |
15:31:26 | * | marmotin_ quit (Remote host closed the connection) |
15:32:03 | * | marmotini_ joined #nim |
15:32:23 | * | marmotini_ quit (Read error: Connection reset by peer) |
15:32:37 | * | marmotini_ joined #nim |
15:33:26 | Zevv | I've been watching the old Hitchcock Presents series. I *can* believe these are almost 60 years ago now :) |
15:34:03 | * | marmotini_ quit (Remote host closed the connection) |
15:34:05 | Zevv | I heard some people even watch Columbo |
15:34:50 | * | marmotini_ joined #nim |
15:36:01 | FromGitter | <alehander92> imagine reading `genesis 18`: can you believe its been only n thousand years |
15:43:04 | * | marmotini_ quit (Remote host closed the connection) |
15:51:32 | * | marmotini_ joined #nim |
15:51:37 | FromGitter | <Varriount> Zevv: I don't know if you saw my earlier question (because the bridge bot was down): how feasible do you think it would be to add an optimization pass to NPeg's internal instruction code? |
15:57:22 | * | marmotini_ quit (Quit: Leaving...) |
15:57:36 | * | marmotini_ joined #nim |
16:02:00 | * | hax-scramper quit (Ping timeout: 258 seconds) |
16:02:22 | * | hax-scramper joined #nim |
16:03:52 | Zevv | well, there kind of are a few already |
16:04:00 | Zevv | what are you thinking of? |
16:04:51 | FromGitter | <yglukhov> @timotheecour can you restart this job pls? https://dev.azure.com/nim-lang/Nim/_build/results?buildId=2996&view=logs&j=f6c2f757-7152-5b00-b42b-aaebf1a063dd&t=f0f21f3f-4495-55c9-9119-ef53cf103fc2 |
16:07:05 | Zevv | varriout: I do already some peephole opts. tail calls are optimized, captures are postponed when possible and some other small things |
16:07:49 | * | m4r35n357 quit (Quit: Ex-Chat) |
16:08:01 | Zevv | the problem is that there is no AST for the IR, it gets generated in one pass, kind of recursively growing like crystals |
16:08:39 | Zevv | I thought of adding an AST, but since I lack the smarts to do proper optimization there I didnt see the benefit |
16:09:05 | Zevv | also, I think npeg is just pretty much fast enough as it is, for the purposes I see it getting used for |
16:09:24 | Zevv | so I prefer simplicity at this time |
16:15:09 | leorize | @yglukhov: close then reopen your pr |
16:15:39 | FromGitter | <yglukhov> it's not my pr though :) |
16:19:13 | * | Pqzcih5 joined #nim |
16:23:36 | * | natrys joined #nim |
16:25:31 | * | dddddd joined #nim |
16:30:07 | * | marmotini_ quit (Remote host closed the connection) |
16:30:43 | * | marmotini_ joined #nim |
16:35:04 | * | marmotini_ quit (Remote host closed the connection) |
16:35:20 | * | marmotini_ joined #nim |
16:47:33 | * | nsf quit (Quit: WeeChat 2.7) |
16:50:13 | * | marmotini_ quit (Remote host closed the connection) |
16:50:45 | * | marmotini_ joined #nim |
16:50:50 | disruptek | lemme get some more coffee and beat the dogs and then i'll stream an attempt to figure out the scope of incremental compilation. |
16:51:28 | disruptek | it seems that none of the bounties i applied for are ripe for implementation. 🙁 |
16:51:54 | FromDiscord | <Rika> Excuse me did you say beat the dogs |
16:51:56 | * | rockcavera quit (Remote host closed the connection) |
16:52:04 | * | adalricus joined #nim |
16:53:11 | * | rockcavera joined #nim |
16:53:20 | disruptek | well, you don't know them like i do. |
16:54:09 | * | icebattle joined #nim |
16:54:39 | FromDiscord | <Rika> Uh, fair point... |
16:54:48 | * | Kaivo quit (Quit: WeeChat 2.7.1) |
16:55:06 | * | marmotin_ joined #nim |
16:55:44 | * | marmotini_ quit (Remote host closed the connection) |
17:04:26 | * | marmotin_ quit (Remote host closed the connection) |
17:04:59 | * | marmotini_ joined #nim |
17:06:27 | * | marmotini_ quit (Read error: Connection reset by peer) |
17:06:39 | * | marmotini_ joined #nim |
17:10:25 | * | natrys quit (Ping timeout: 240 seconds) |
17:13:00 | * | Vladar joined #nim |
17:14:33 | * | natrys joined #nim |
17:21:30 | disruptek | is it "merge monday"? |
17:27:07 | FromGitter | <Varriount> disruptek: Surely you mean "pet the dogs", right? |
17:27:22 | FromGitter | <alehander92> @kristianmandrup are you here |
17:27:58 | FromGitter | <Varriount> 🐶🐶🐶 |
17:28:15 | FromGitter | <alehander92> iv'e seen photos |
17:28:24 | FromGitter | <alehander92> but i think those were elegant beef's dogs |
17:32:50 | * | sigmapie8 joined #nim |
17:34:50 | disruptek | ~bentley |
17:34:51 | disbot | bentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek |
17:34:51 | disbot | bentley: 11a good boy |
17:38:09 | FromGitter | <alehander92> dude people like your dog |
17:38:09 | FromGitter | <alehander92> https://imgur.com/gallery/wyPnn8j |
17:38:33 | FromGitter | <alehander92> 3/4 gif comments impressed |
17:38:53 | disruptek | ~stream |
17:38:54 | disbot | stream: 11https://twitch.tv/disruptek and mumble://uberalles.mumbl.io/ -- disruptek |
17:39:51 | * | icebattle quit (Ping timeout: 260 seconds) |
17:40:45 | * | Trustable joined #nim |
17:41:34 | * | filcuc joined #nim |
17:43:22 | disruptek | incremental compilation is so broken that it must be enabled in boot? |
17:45:49 | * | sendell[m] joined #nim |
17:47:30 | disruptek | so far it doesn't seem to work at all. |
17:48:39 | sendell[m] | hey guys :) |
17:48:57 | * | filcuc quit (Ping timeout: 258 seconds) |
17:48:58 | disruptek | sup dawg |
17:49:38 | sendell[m] | do any of you know a way to declare js functions directly inside a nim file, instead of calling an external one ? :) |
17:50:04 | sendell[m] | i think I did it before, but can't remember how |
17:52:34 | disruptek | nim js somefile.nim |
17:54:12 | sendell[m] | no but I mean write js code inside the nim file instead of calling a js function through {.importc.} |
17:56:05 | disruptek | .emit. |
17:56:06 | leorize | sendell[m]: {.emit.} |
17:56:09 | leorize | but why? |
17:56:41 | sendell[m] | oh thx ! |
17:57:48 | sendell[m] | because i'm writting tasker script, and some variables are declared by the framework before the js code is run |
17:57:58 | sendell[m] | cannot access them any other way |
17:58:01 | sendell[m] | https://tasker.joaoapps.com/userguide/en/javascript.html#localvars |
17:59:46 | leorize | you can importc the variables btw |
18:00:09 | * | marmotini_ quit (Remote host closed the connection) |
18:00:45 | * | marmotini_ joined #nim |
18:01:45 | * | filcuc joined #nim |
18:02:37 | sendell[m] | oh even better |
18:02:38 | sendell[m] | thx |
18:05:11 | * | marmotini_ quit (Ping timeout: 256 seconds) |
18:07:26 | * | marmotini_ joined #nim |
18:08:36 | Zevv | ooh doing dog pics |
18:08:37 | Zevv | can I join |
18:08:51 | Zevv | https://imgur.com/7q3PVLd |
18:09:25 | disruptek | bentley really likes your dog. |
18:09:29 | FromGitter | <matrixbot> `reversem3` nim is created from C right |
18:09:40 | Zevv | disruptek: me too |
18:10:03 | Zevv | cool bently pic, I like the perspective |
18:10:14 | leorize | @reversem3: wdym? |
18:10:25 | disruptek | if you could get on mumble, you could hear bentley's comments. |
18:10:25 | leorize | btw come join us here on irc :p |
18:10:37 | FromGitter | <matrixbot> `reversem3` so how does nim create pointers in C and then translate to nim? Example how nim accesses files ? |
18:11:07 | Yardanico | @reversem3 Nim has a few code backends like C, and I don't really understand your question |
18:11:24 | Yardanico | Nim compiler itself (and Nim libraries) are written in Nim |
18:11:55 | FromGitter | <matrixbot> `reversem3` I'm trying to understand why C needs a pointer to access files first. |
18:12:14 | leorize | that's just how their stdlib works |
18:12:25 | leorize | you can use the OS native functionality to perform so |
18:12:31 | FromGitter | <matrixbot> `reversem3` I know its stupid question, but I'm really curious and then how does Nim does it |
18:12:39 | leorize | you will get a HANDLE or int depends on the OS |
18:12:51 | leorize | Nim uses C's stdlib to perform file IO |
18:12:55 | FromGitter | <matrixbot> `reversem3` oh really stdlib requries a pointer to access files ? |
18:13:12 | leorize | I'm planning to rewrite it to remove that dependency |
18:13:20 | leorize | not a pointer per-se |
18:13:26 | leorize | but a `FILE*` |
18:13:34 | leorize | which is an opaque object |
18:13:40 | FromGitter | <matrixbot> `reversem3` so fp* |
18:13:49 | * | sigmapie8 quit (Quit: Leaving) |
18:14:12 | FromGitter | <matrixbot> `reversem3` ok so does stblib use a file pointer because of buffer issues ? |
18:14:15 | leorize | it contains everything needed by the C stdlib to perform I/O on a file on the target platform |
18:14:28 | leorize | nah, they just want to hide the implementation |
18:14:31 | leorize | typical C things :P |
18:15:05 | leorize | and to let you pass the FILE* around in your code, of course |
18:15:15 | * | clemens3 quit (Ping timeout: 260 seconds) |
18:15:24 | FromGitter | <matrixbot> `reversem3` damn , ok , I'm finally digging into C and leanring the ins and outs. |
18:15:39 | leorize | if you wanna study these things, I'd recommend looking at musl libc code for stdio |
18:16:00 | leorize | their code is clean and concise, and also posix compliant :) |
18:16:17 | FromGitter | <matrixbot> `reversem3` musl libc? |
18:16:26 | leorize | yea |
18:16:33 | FromGitter | <matrixbot> `reversem3` ok thanks |
18:16:42 | leorize | a language always go with an stdlib :) |
18:16:54 | leorize | you gotta study both |
18:17:57 | FromGitter | <matrixbot> `reversem3` interesting musl libc isn't standard for linux kernel then |
18:18:15 | FromGitter | <matrixbot> `reversem3` are you using this ? |
18:18:52 | leorize | well the kernel gotta provides its own stdlib |
18:18:52 | leorize | since all functions gotta start somewhere |
18:18:58 | FromGitter | <matrixbot> `reversem3` nm not kernel its userpace |
18:19:22 | Yardanico | Linux itself doesn't have any default libc |
18:19:30 | leorize | glibc gained dominance long before musl appeared |
18:19:35 | Yardanico | but of course the de-facto standard libc for most linux distros is glibc |
18:20:13 | FromGitter | <matrixbot> `reversem3` right , but is anyone using mulc in there linux implementations ? |
18:20:17 | Yardanico | of course |
18:20:24 | Yardanico | musl is smaller and in some cases faster |
18:20:25 | FromGitter | <matrixbot> `reversem3` * right , but is anyone using mulc in their linux implementations ? |
18:20:37 | leorize | I'm running gentoo/musl for example :) |
18:20:55 | FromGitter | <matrixbot> `reversem3` really |
18:20:57 | FromGitter | <matrixbot> `reversem3` I run funtoo |
18:20:58 | leorize | @reversem3: please join #freenode_#nim:matrix.org, it's much better |
18:21:24 | FromGitter | <sheerluck> so leorize, Araq, disruptek and me are 4 gentoo users here |
18:21:49 | leorize | I'm pretty sure Araq don't use linux other than a ubuntu vm for debugging nim |
18:22:01 | FromGitter | <matrixbot> `reversem3` ok so I use funtoo and compiling everytihng accept brave browser |
18:22:09 | Yardanico | yeah, AFAIK Ar*q mostly uses windows |
18:22:22 | FromGitter | <matrixbot> `reversem3` I use zfs with funtoo |
18:23:07 | Yardanico | @reversem3 read https://github.com/matrix-org/matrix-appservice-irc/wiki/Guide:-How-to-use-Matrix-to-participate-in-IRC-rooms please :) |
18:23:15 | Yardanico | so you can connect to the IRC channel natively |
18:23:43 | FromGitter | <matrixbot> `reversem3` ok sorry guys |
18:43:47 | * | Vladar quit (Quit: Leaving) |
18:43:50 | * | xet7 quit (Quit: Leaving) |
18:44:16 | * | xet7 joined #nim |
18:48:01 | * | marmotini_ quit (Remote host closed the connection) |
18:48:34 | * | marmotini_ joined #nim |
18:49:51 | * | reversem3 joined #nim |
18:52:41 | reversem3 | !stblib |
18:53:04 | * | marmotini_ quit (Ping timeout: 255 seconds) |
18:53:05 | * | reversem3 quit (Remote host closed the connection) |
18:54:30 | * | marmotini_ joined #nim |
18:54:36 | krux02 | I have a failing PR and one of the important packages fails. What is the recommended way to reproduce the test failure locally? |
18:55:38 | leorize | testament cat nimble-packages |
18:56:03 | leorize | remember to point testament to the right compiler with --nim: as well |
19:00:02 | * | nsf joined #nim |
19:04:03 | * | jjido joined #nim |
19:10:06 | * | hax-scramper quit (Ping timeout: 240 seconds) |
19:11:01 | * | hax-scramper joined #nim |
19:20:06 | * | narimiran joined #nim |
19:21:14 | * | icebattle joined #nim |
19:22:44 | * | Pqzcih5- joined #nim |
19:23:18 | * | Pqzcih5 quit (Remote host closed the connection) |
19:25:40 | FromDiscord | <Recruit_main70007> can somebody explain me what is the difference between ref object of RootObj and object, i dont understand what does it mean that its a ref object, it is inheritance? |
19:26:43 | FromDiscord | <Recruit_main70007> is it* |
19:27:05 | leorize[m] | no |
19:27:18 | leorize[m] | you parsed it in all the wrong locations :p |
19:27:47 | leorize[m] | so let's dive in to objects first |
19:28:13 | leorize[m] | you have the plain ol' `object` and `object of SomeType` |
19:28:19 | leorize[m] | the second form introduces inheritance |
19:29:14 | FromDiscord | <Recruit_main70007> what about `ref` |
19:29:47 | leorize[m] | ref just means that the type is on the heap :) |
19:30:34 | leorize[m] | inheritance is a property of objects, not `ref` |
19:31:12 | FromDiscord | <Recruit_main70007> oki, i also have the question, nim objects get compiled as c structs or as classes? |
19:31:47 | leorize[m] | neither, though implementation wise it's always a struct |
19:32:31 | FromDiscord | <Recruit_main70007> i sometimes wish nim's oop was a bit more complex |
19:33:08 | leorize[m] | the compiler is allowed to rearrange the fields in an object to generate more efficient code, which is incompatible with C, obviously |
19:33:17 | leorize[m] | though the compiler don't have optimization like that in place yet |
19:33:26 | leorize[m] | wdym a bit more complex? |
19:33:45 | * | letto quit (Remote host closed the connection) |
19:34:02 | FromDiscord | <Recruit_main70007> like, more proper classes |
19:34:11 | * | letto joined #nim |
19:34:43 | * | Pqzcih5- quit (Ping timeout: 240 seconds) |
19:35:16 | leorize[m] | there are macros for that |
19:35:36 | FromDiscord | <Recruit_main70007> i know, but its only kind of a visual cheat |
19:35:38 | leorize[m] | though I recommend learning how to make programs without them |
19:36:05 | FromDiscord | <Recruit_main70007> i still have toto learn how to make them XD |
19:36:34 | * | sz0 joined #nim |
19:37:35 | leorize[m] | Recuit_main70007 everything is a visual cheat when you think about it |
19:38:34 | FromDiscord | <Recruit_main70007> true, i sometimes wonder if the compiler overcomplicates things and a 1:1 transpilation would be more efficient (probably in some cases) |
19:38:55 | * | Pqzcih5 joined #nim |
19:43:23 | leorize[m] | well the compiler generates C code that is as or more efficient to what you can write :) |
19:44:20 | leorize[m] | nim stdlib is not a C stdlib clone, fwiw |
19:44:39 | leorize[m] | we do make use of the C stdlib for I/O currently |
19:44:58 | leorize[m] | that will change in later versions though |
19:47:41 | leorize[m] | no |
19:49:13 | leorize[m] | most of the stdlib is written in pure Nim |
19:49:46 | leorize[m] | the compiler and stdlib only dependency rn is libc (not counting the included wrapper modules) |
19:50:21 | FromDiscord | <kodkuce> arc stable now, and 1 question about karax or react i newer got how does client get it, like do i serve client a staticly client(react/karax) build or what? |
19:50:31 | FromDiscord | <kodkuce> is arc stable now?, and 1 question about karax or react i newer got how does client get it, like do i serve client a staticly client(react/karax) build or what? |
19:50:56 | FromDiscord | <kodkuce> is arc stable now?, and 1 question about karax or react i newer got how does client get it, like do i serve client like static file(react/karax) build or what? |
19:50:58 | * | nsf quit (Quit: WeeChat 2.7) |
19:53:25 | FromDiscord | <kodkuce> is arc stable now? ok found about react/karax |
19:53:31 | FromDiscord | <kodkuce> is arc stable now? |
19:54:43 | narimiran | why is that so important to you personally? |
19:54:48 | leorize[m] | please don't edit your messages on discord |
19:54:49 | leorize[m] | it spams irc |
19:55:41 | narimiran | what do you expect from arc? to cure cancer? |
19:56:16 | narimiran | and what would "stable" mean? is nim in general stable? |
19:56:49 | * | adalricus quit (Quit: ERC (IRC client for Emacs 26.3)) |
20:01:56 | clyybber | leorize[m]: Are you seeing ghosts? Could it be that you are seeing some matrix messages that we mere IRC mortals are not able to see? |
20:05:17 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:05:44 | leorize[m] | different gc strategy don't applies to the js backend |
20:06:18 | leorize[m] | clyybber: reversem3 is on matrix |
20:06:27 | leorize[m] | and interesting not on irc lol |
20:07:37 | FromDiscord | <kodkuce> oh sorry i frogot about irc |
20:07:44 | FromDiscord | <kodkuce> again 😦 |
20:08:29 | FromDiscord | <kodkuce> i expect form arc to alowe me to multythread async/websockets for a game |
20:08:31 | leorize[m] | reversem3: can you try leaving then rejoin? it appears that the bridge might have glitched |
20:09:07 | FromGitter | <zetashift> gitter also receives the edit multiple times |
20:10:58 | leorize[m] | that'd require more than just arc, but arc is a start |
20:11:36 | FromGitter | <zetashift> Can't one do that now? |
20:11:44 | disruptek | yep. |
20:14:35 | lqdev[m] | @kodkuce you're already able to multithread apps pretty well using --gc:boehm |
20:15:25 | disruptek | shashlick's px2 (?) is a good demo of multithreaded async. |
20:15:43 | disruptek | iirc, it doesn't require boehm. |
20:16:28 | shashlick | px2 doesn't need boehm since there is no sharing across the threads |
20:17:16 | disruptek | i think of the boehm "solution" as a hack, personally. |
20:17:54 | disruptek | okay, what to stream... golden, nimph, nigel, or incremental compilation? |
20:18:02 | disruptek | or some other crap? |
20:18:24 | FromDiscord | <kodkuce> will check boehm |
20:18:59 | FromDiscord | <Recruit_main70007> incremental |
20:19:23 | disruptek | you really like watching me fail, don't you? |
20:19:58 | FromDiscord | <Recruit_main70007> i mean, nimph |
20:20:06 | shashlick | why is it a hack - boehm supports it, other gcs don't |
20:20:33 | shashlick | it is an established, mature garbage collector |
20:20:34 | disruptek | it's a hack because you're relying upon loosening semantics and then letting the gc pick up the pieces. |
20:21:05 | disruptek | it's like when i used to teach english as a second language. |
20:21:09 | shashlick | so if I use --gc:arc and it supports it then it is no longer a hack? |
20:21:44 | disruptek | if you aren't just tagging everything as gcsafe when it isn't, willy-nilly, sure. |
20:21:53 | disruptek | the difference between "right" and "correct": |
20:22:10 | disruptek | you can stick a banana up your ass and it fits "right", but it's not "correct." |
20:22:19 | disruptek | you feel me? |
20:22:20 | shashlick | well, i'm using shared memory and locks, that's a standard way of doing this |
20:22:23 | clyybber | both aren't hacks. no? |
20:22:33 | disruptek | no. |
20:22:36 | clyybber | yes |
20:22:38 | clyybber | as in no |
20:22:49 | clyybber | using --gc:boehm isn't a hack |
20:23:55 | disruptek | in that case, nim's mm is a hack and only boehm's is correct. |
20:24:02 | clyybber | no? |
20:24:09 | disruptek | argue that shit to my face. |
20:24:09 | clyybber | non-default != hack |
20:24:26 | clyybber | but arguably using --gc:arc is more future proof |
20:24:29 | shashlick | what's the right way of sharing memory then? boehm isn't the argument here |
20:24:41 | * | zahary joined #nim |
20:24:44 | disruptek | arc is a superior solution imo. |
20:24:54 | disruptek | it's more correct. |
20:24:59 | clyybber | no |
20:25:05 | clyybber | there is no correctness level here |
20:25:08 | shashlick | boehm is just smart enough to know a blob is still in use and not collecting it |
20:25:12 | clyybber | both are correct |
20:25:19 | disruptek | there is if you mislabel your shit and expect it to work. |
20:25:35 | clyybber | hmm, I think I'm missing something |
20:25:38 | shashlick | you aren't even bothering to understand the problem here |
20:25:43 | clyybber | can you point me to code that is a hack here? |
20:25:44 | disruptek | who are you talking to? |
20:25:48 | * | marmotini_ quit (Remote host closed the connection) |
20:25:53 | disruptek | i've been using boehm since 1990. |
20:25:58 | clyybber | because compiling with --gc:boehm alone certainly isnt |
20:26:04 | disruptek | that's not the point. |
20:26:23 | * | marmotini_ joined #nim |
20:26:44 | disruptek | anyway, i'd rather stream than debate this. you can debate it with me on there if you really want. |
20:26:55 | shashlick | main thread creates an object and shares it with a child thread, both main thread and child access the object using locks |
20:26:58 | disruptek | recruit wants to see some nimph code for some reason. |
20:27:30 | * | marmotini_ quit (Read error: Connection reset by peer) |
20:27:39 | shashlick | default gc collects the object when it is still in use since it is not aware across threads, boehm is smart enough to know not to |
20:27:44 | * | marmotini_ joined #nim |
20:28:39 | FromGitter | <Knaque> I hate to interrupt, but I've just tried running some of the examples in treeform/fidget, and I'm getting the following error: https://hastebin.com/raw/ucuworinuj |
20:29:02 | FromDiscord | <Recruit_main70007> disruptek, oh, i cant see it, (which doesnt mean i wouldnt like to |
20:29:10 | FromDiscord | <Recruit_main70007> dont base the decision on me) |
20:29:32 | Yardanico | @Knaque do you have libx11-dev (if it's a deb-based system)? basically a devel package for X11 |
20:29:40 | Yardanico | ah wait libxcursor-dev |
20:32:33 | FromGitter | <Knaque> Just apt-got libxcursor-dev, now it's complaining that it can't find `X11/extensions/Xrandr.h` |
20:33:26 | FromGitter | <Knaque> Do I need *both*? Instructions unclear. |
20:34:34 | clyybber | yeah, install xrandr-dev too |
20:34:50 | clyybber | prolly libxrandr-dev |
20:35:07 | lqdev[m] | you need these to use glfw https://github.com/liquid600pgm/rapid#debian-and-ubuntu |
20:35:22 | lqdev[m] | it's not strictly rapid-related btw |
20:35:45 | lqdev[m] | install those under rapid/gfx |
20:38:16 | clyybber | whos talking about rapid? |
20:39:19 | lqdev[m] | noone, I'm just linking the dev dependencies of glfw |
20:39:26 | lqdev[m] | and I have them conveniently written down for 3 OSes right in rapid's readme |
20:39:38 | lqdev[m] | s/OSes/distros |
20:40:07 | clyybber | this isn't about glfw tho :p |
20:40:25 | lqdev[m] | it is. |
20:40:28 | lqdev[m] | fidget uses glfw. |
20:40:51 | clyybber | oh, yeah. I only now saw its staticglfw |
20:41:15 | clyybber | statically linking to glfw really sucks tho |
20:41:44 | lqdev[m] | why? |
20:41:57 | lqdev[m] | because licensing? |
20:42:01 | clyybber | no |
20:42:09 | clyybber | because of updates |
20:42:29 | FromGitter | <Knaque> Looks like things are working now. Had an issue with an example where it couldn't find `Ubuntu.svg`, but I think it's fair to say that that's an unrelated issue. |
20:42:30 | clyybber | for example minecraft links glfw statically |
20:42:37 | clyybber | and because of that we can't run it on wayland |
20:42:40 | clyybber | without recompiling |
20:42:49 | disruptek | you make me sad. |
20:43:27 | lqdev[m] | yeah, glfw will update to 4.0 and break some of your code. nice! when it's statically linked, that is. when it's dynamically linked, some symbols will disappear and the app won't work for the user. not nice. |
20:43:32 | disruptek | no one can decide whether nim apps should use shared libs or not. |
20:43:32 | lqdev[m] | but yeah things like this suck |
20:43:36 | clyybber | oh, nevermind, lwjgl isnt so stupid anymore |
20:43:44 | clyybber | But it was |
20:43:46 | clyybber | and it sucked |
20:43:51 | lqdev[m] | imo it's fine to statically link as long as your project is open-source. |
20:44:00 | lqdev[m] | and you pull the source from git. |
20:44:07 | clyybber | lqdev[m]: Except that glfw is backwards compatible |
20:44:27 | clyybber | lqdev[m]: Yeah, its not that bad if its OSS |
20:44:35 | clyybber | but its still bad IMO |
20:44:48 | lqdev[m] | not really https://www.glfw.org/docs/latest/group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c |
20:44:50 | lqdev[m] | it's going away in 4.0 |
20:45:06 | lqdev[m] | and unless they're gonna split glfw to 2 distinct packages, things will break |
20:45:09 | clyybber | then distros can distribute glfw3 |
20:46:31 | FromDiscord | <él liquido> @treeform https://github.com/treeform/staticglfw/blob/master/src/staticglfw.nim#L36 the version of glfw you're using doesn't require to link anything except X11 and GL, afaik |
20:46:37 | FromDiscord | <él liquido> 3.3 introduced linking at runtime |
20:46:56 | lqdev[m] | back to matrix. |
20:47:26 | clyybber | back to matrix? |
20:47:32 | clyybber | do you have your own chat there? |
20:47:38 | lqdev[m] | yeah |
20:47:41 | clyybber | horrible |
20:47:42 | lqdev[m] | el liquido is my discord account. |
20:47:49 | lqdev[m] | what? |
20:47:55 | disruptek | the matrix is all around you. |
20:47:58 | lqdev[m] | I'm just using riot |
20:48:00 | clyybber | horrible that it isn't linked properly |
20:48:05 | clyybber | matrix is great otherwise |
20:48:54 | lqdev[m] | the homepage links to #freenode_#nim:matrix.org, which is correct |
20:49:04 | * | filcuc quit (Quit: Konversation terminated!) |
20:49:08 | clyybber | but some matrix peeps are seeing ghosts |
20:49:14 | disruptek | wut |
20:49:21 | * | filcuc joined #nim |
20:49:27 | clyybber | reversem3 is a ghost |
20:49:33 | lqdev[m] | ah, le0rize. |
20:49:35 | disruptek | whahuh? |
20:49:43 | lqdev[m] | the freenode bridge is buggy af. |
20:49:46 | clyybber | disruptek: booh! |
20:50:01 | disruptek | do you know anything about IC? |
20:50:10 | * | hax-scramper quit (Read error: Connection reset by peer) |
20:50:12 | clyybber | a tiny lil bit |
20:50:14 | lqdev[m] | integrated circuits? |
20:50:21 | * | hax-scramper joined #nim |
20:50:22 | clyybber | incremental compilation |
20:50:31 | disruptek | what do you know? |
20:50:38 | clyybber | disruptek: what do you want to know? |
20:50:51 | disruptek | do you know why it doesn't work? |
20:51:06 | clyybber | yeah, its in the unfortunate state of "not finished" |
20:51:30 | disruptek | any specifics? |
20:51:37 | disruptek | i just spent an hr on it today. |
20:52:12 | disruptek | my theory is that we're not writing type annotations correctly, so we break while reading them back in. |
20:53:10 | clyybber | disruptek: what annotations? |
20:53:25 | disruptek | most likely, sink/lent stuff. |
20:53:33 | clyybber | Oh, yeah its not tested |
20:53:44 | clyybber | only incremental compilation alone is |
20:53:50 | clyybber | not with --gc:arc or newruntime |
20:54:04 | disruptek | it doesn't work outside of arc, either. |
20:54:13 | clyybber | hmm |
20:54:24 | clyybber | at least the tests in tests/ic should work |
20:56:52 | clyybber | ok at least thallo.nim :p |
20:59:25 | disruptek | i don't think that test is effective. |
21:00:34 | FromDiscord | <Elegant Beef> Is there a library that wraps extracting files? |
21:00:41 | disruptek | extracting? |
21:00:46 | disruptek | !repo nimarchie |
21:00:48 | disruptek | !repo nimarchive |
21:00:49 | FromDiscord | <Elegant Beef> zips/tars |
21:00:52 | disbot | https://github.com/genotrance/nimarchive -- 9nimarchive: 11libarchive wrapper for Nim 15 11⭐ 0🍴 |
21:00:52 | disbot | no results 😢 |
21:01:57 | FromDiscord | <Elegant Beef> cool thanks |
21:02:58 | disruptek | ~stream |
21:02:59 | disbot | stream: 11https://twitch.tv/disruptek and mumble://uberalles.mumbl.io/ -- disruptek |
21:03:06 | disruptek | i guess miscellaneous debris. |
21:09:43 | leorize[m] | reversem3 I don't know why but you're not bridged to irc |
21:10:01 | leorize[m] | probably a bug in matrix.org bridge |
21:10:15 | leorize[m] | you probably should go back to gitter for now |
21:12:04 | * | jjido joined #nim |
21:15:07 | FromDiscord | <kodkuce> just tryed karax how do i change button text on click |
21:15:08 | FromDiscord | <kodkuce> https://play.nim-lang.org/#ix=2ddk |
21:15:24 | FromDiscord | <kodkuce> how do i get reference to created elements |
21:15:35 | FromDiscord | <kodkuce> or do i need first to var them? |
21:16:02 | FromDiscord | <Elegant Beef> in normal JS you can get the clicked item through the event, bit there is also the Vnode param |
21:16:09 | FromDiscord | <Elegant Beef> so one of those two should get you the node i imagine |
21:16:31 | leorize | welcome to virtual dom |
21:16:42 | leorize | you don't try to "edit" something |
21:16:48 | leorize | you make a new node with the change |
21:17:06 | leorize | the system detects what changed and applies it to your dom |
21:17:12 | FromDiscord | <kodkuce> ok got button changing values |
21:17:13 | FromDiscord | <Elegant Beef> So uhh how the hell does one download releases through an oauth httprequest on github 😄 |
21:17:56 | FromDiscord | <Elegant Beef> using the browser_download_url complains about a 404 error, which is weird |
21:18:01 | FromDiscord | <kodkuce> so it detectects i cahnged some global var and cuz thet var is used for button text it auto updates it |
21:20:40 | leorize | @kodkuce: actually it just do a `redraw()` when after a callback automatically |
21:21:51 | shashlick | whew, plugins finally passes CI |
21:22:28 | FromDiscord | <kodkuce> ok i kinda think i get how it works |
21:22:40 | clyybber | shashlick: Does it work with --gc:arc too? |
21:22:50 | shashlick | no just boehm so far, i've not tested arc yet |
21:23:50 | clyybber | k |
21:23:59 | shashlick | how about a review of the api |
21:24:06 | clyybber | leorize: Your nimryu is ready? |
21:24:24 | leorize | clyybber: nah, I'm not working on it atm |
21:24:33 | clyybber | leorize: Whats missing tho? |
21:24:39 | clyybber | It seems that it prints numbers |
21:24:43 | leorize | the implementation :p |
21:24:49 | leorize | what you see is not ryu |
21:25:03 | clyybber | yeah, but does it have the same output as ryu? |
21:25:07 | leorize | yes |
21:25:12 | * | lritter quit (Quit: Leaving) |
21:25:12 | clyybber | then its fine :) |
21:25:15 | * | zahary quit (Quit: Leaving.) |
21:25:34 | * | zahary joined #nim |
21:25:42 | leorize | and around 4x slower than musl libc's float-to-string |
21:25:44 | clyybber | leorize: its only missing the crazy microoptimizations i suppose |
21:25:46 | clyybber | oh |
21:26:03 | * | zahary quit (Client Quit) |
21:26:13 | leorize | it requires integer with size up to 4096 bits |
21:26:44 | leorize | it's not useful outside of figuring out what the hell is being done in ryu |
21:26:48 | clyybber | oh lol |
21:26:51 | clyybber | ok |
21:26:58 | clyybber | 4096 is a bit big yeah |
21:27:06 | leorize | you can read it to figure out your way around ryu messy codebase :P |
21:27:32 | * | Lord_Nightmare quit (Read error: Connection reset by peer) |
21:27:50 | clyybber | yeah, the comments are nice |
21:27:57 | clyybber | shashlick: Looks fine at a first glance |
21:28:13 | clyybber | I think only real world usage will uncover true issues |
21:28:20 | clyybber | so lqdev[m] is your best bet for now |
21:28:46 | shashlick | ya i hope he tries it out |
21:28:54 | shashlick | did you see the api docs? |
21:29:03 | clyybber | looking at them as we speak |
21:29:13 | shashlick | just tried latest nim devel arc and it crashes |
21:29:25 | shashlick | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
21:29:25 | clyybber | heh |
21:29:30 | clyybber | where? |
21:30:16 | shashlick | crashes here - https://github.com/genotrance/plugins/blob/master/src/plugins.nim#L490 |
21:30:29 | shashlick | which means it is not going to be easy to figure out 😄 |
21:30:44 | clyybber | oh yeah |
21:30:56 | lqdev[m] | I did see the docs, the lib looks pretty nice |
21:31:12 | * | marmotini_ quit (Remote host closed the connection) |
21:31:32 | lqdev[m] | one thing I don't really like is the command system, it looks kinda weird to me |
21:31:40 | shashlick | what are the general code changes needed to support arc |
21:31:46 | * | marmotini_ joined #nim |
21:31:46 | clyybber | Yep, only "criticism" is that you use Ctx instead of Context |
21:31:51 | clyybber | shashlick: Break up cycles |
21:31:51 | lqdev[m] | why not just share data between the app and plugin normally, using objects and procs? |
21:32:04 | clyybber | shashlick: Apart from that nothing really. |
21:32:06 | lqdev[m] | clyybber: and `plg` instead of `plugin` |
21:32:28 | clyybber | yeah |
21:32:30 | clyybber | that too |
21:32:37 | clyybber | no wait |
21:32:41 | clyybber | Plugin is the type |
21:32:59 | clyybber | oh in the callbacks |
21:33:35 | * | narimiran quit (Ping timeout: 260 seconds) |
21:33:41 | shashlick | lqdev: you can access every other plugin's data and callbacks from the global context if you want |
21:33:57 | lqdev[m] | right |
21:36:05 | * | marmotini_ quit (Ping timeout: 240 seconds) |
21:36:09 | shashlick | i can change the cosmetic stuff - ctx, plg, etc. that's easy |
21:37:09 | shashlick | lqdev: what helper procs do you need to make accessing other plugins |
21:37:42 | * | fredrik92 quit (Read error: Connection reset by peer) |
21:37:50 | lqdev[m] | I don't need other plugins, I need the main app state |
21:38:06 | * | fredrik92 joined #nim |
21:38:23 | lqdev[m] | I guess that's what Ctx does? |
21:38:45 | shashlick | well, the way I wrote feud, everything was in plugins, nothing was in the main app besides the main loop |
21:38:50 | shashlick | so there was no main app state |
21:39:05 | shashlick | we can always add a field in context to store that |
21:39:08 | disruptek | damn game programmers. |
21:40:52 | lqdev[m] | you do you, it's your plugin system. would be nice if you could outline the plugin architecture in the readme, I'm kinda confused on how things are supposed to work |
21:41:07 | shashlick | it is in the docs |
21:41:21 | shashlick | the plugins module is used in the main app, api module in plugins |
21:41:35 | shashlick | and both describe it in some detail |
21:41:36 | lqdev[m] | oh I see |
21:41:40 | lqdev[m] | I'm just blind |
21:42:11 | shashlick | since I am changing names, what's a better name for context |
21:42:15 | shashlick | in this context 🙂 |
21:42:54 | * | beatmox quit (Remote host closed the connection) |
21:43:06 | lqdev[m] | PluginManager? |
21:43:12 | lqdev[m] | idk |
21:43:25 | * | beatmox joined #nim |
21:43:35 | leorize | context is never a bad name :P |
21:44:05 | shashlick | gosh you guys like verbose names |
21:44:30 | shashlick | okay, ctx => manager, Ctx => PluginManager |
21:44:33 | shashlick | plg => plugin |
21:44:43 | disruptek | just use a real word. |
21:45:35 | * | sz0 quit (Quit: Connection closed for inactivity) |
21:46:30 | lqdev[m] | it's not verbose. `plugin` is short enough to be used as an entire word, `PluginManager` better reflects what the thing in question actually does. |
21:47:07 | lqdev[m] | also, `manager` is too long for my taste, I'd go with `pm` but that's probably not great either |
21:47:13 | lqdev[m] | maybe `mgr` |
21:47:18 | * | solitudesf joined #nim |
21:47:21 | shashlick | mgr is okay but plg is not? |
21:48:07 | lqdev[m] | idk, that's just my retarded naming scheme. carry on. |
21:48:14 | disruptek | leave it lone. |
21:48:16 | disruptek | long, too. |
21:48:28 | FromDiscord | <Elegant Beef> i mean neither are ok imo |
21:48:41 | FromDiscord | <Elegant Beef> Not like names cost you more to write |
21:49:11 | FromDiscord | <Elegant Beef> Ok so i've not a clue how to download a release from a private repo using rest |
21:49:33 | FromDiscord | <Elegant Beef> Added the `"Accept": "application/octet-stream"` but now it complains about multiple auths |
21:50:47 | shashlick | okay i'm changing Ctx => PluginManager and ctx => mgr, leaving plg alone - too many of those |
21:51:41 | shashlick | gah, plugin and manager it is |
21:52:05 | FromDiscord | <Elegant Beef> Short names only serve you in the short term |
21:52:12 | FromDiscord | <Elegant Beef> If you comeback or someone else looks at it |
21:52:16 | FromDiscord | <Elegant Beef> It's tedious |
21:52:28 | lqdev[m] | indeed. |
21:53:01 | lqdev[m] | I tend to use the shortest word or an abbreviation if it's multiple words, otherwise just use the entire word unless it's really long and tedious to write |
21:53:58 | FromDiscord | <Elegant Beef> I mean most of the time i only shorten words like Renderer,Transform, Component to something like rend,trsfm,comp but i'd still have their type explicitly written |
22:01:09 | lqdev[m] | same here |
22:01:56 | * | marmotini_ joined #nim |
22:05:10 | * | fredrik92 quit (Read error: Connection reset by peer) |
22:05:19 | FromDiscord | <exelotl> comp I can get behind (despite the ambiguity, it works in context) |
22:05:35 | FromDiscord | <exelotl> rend is weird, and trsfm is horrible. xD |
22:05:36 | * | fredrik92 joined #nim |
22:05:54 | FromDiscord | <Elegant Beef> hey i dont often shorten words |
22:06:38 | * | hax-scramper quit (Read error: Connection reset by peer) |
22:06:56 | * | hax-scramper joined #nim |
22:08:46 | FromDiscord | <exelotl> I'd just call them `r`, and `t` or `tf` lol |
22:09:30 | * | marmotini_ quit (Remote host closed the connection) |
22:10:04 | * | marmotini_ joined #nim |
22:10:27 | FromDiscord | <exelotl> but only if their scope was sufficiently small so that it wouldn't get confusing, else I'd go with the full names |
22:10:56 | FromDiscord | <exelotl> +1 for giving the types the full names |
22:14:00 | * | marmotini_ quit (Read error: Connection reset by peer) |
22:14:16 | * | marmotini_ joined #nim |
22:18:09 | * | marmotini_ quit (Remote host closed the connection) |
22:18:44 | * | marmotini_ joined #nim |
22:23:03 | * | Trustable quit (Remote host closed the connection) |
22:23:31 | * | marmotini_ quit (Ping timeout: 260 seconds) |
22:29:04 | * | natrys quit (Ping timeout: 255 seconds) |
22:30:24 | * | paxis quit (Quit: Client exiting) |
22:37:25 | FromDiscord | <treeform> @él liquido "anything except X11 and GL" do you want me to add that to the docs? as far as I am censured X11 and GL are system libraries you need for any GUI anyways? |
22:37:36 | disruptek | wayland? |
22:38:39 | FromDiscord | <treeform> @Knaque, about https://hastebin.com/raw/ucuworinuj I don't test linux. I think you need x11 headers installed. |
22:39:52 | * | solitudesf quit (Ping timeout: 255 seconds) |
22:40:53 | FromDiscord | <treeform> disruptek, I don't know linux UI dev well enough. |
22:44:44 | disruptek | i can't talk on the phone because i have to wait another 91hrs for the coronavirus on my screen to die. |
22:50:08 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:52:28 | * | hax-scramper quit (Ping timeout: 255 seconds) |
22:53:26 | * | hax-scramper joined #nim |
22:53:55 | * | zahary joined #nim |
22:55:21 | * | marmotini_ joined #nim |
22:56:43 | * | filcuc quit (Quit: Konversation terminated!) |
23:15:23 | * | icebattle quit (Ping timeout: 260 seconds) |
23:18:04 | FromGitter | <timotheecour> Sigh… so many CI failures in the past 2 days (like 5), anyone knows if https://github.com/nim-lang/Nim/issues/13563 (FREEBSD) would be a problem to report upstream to https://builds.sr.ht/ ? i don’t see anything suspicious in .builds/freebsd.yml |
23:18:06 | disbot | ➥ [CI] CI broken: `builds.sr.ht: freebsd.yml` fails: pkg: wrong architecture: FreeBSD:12.0:amd64 ; snippet at 12https://play.nim-lang.org/#ix=2de8 |
23:20:11 | leorize | well that's definitely a ci problem |
23:22:27 | disruptek | clyybber broke us. |
23:23:37 | FromGitter | <Varriount> clyybber clobbered continuous integration |
23:23:59 | disruptek | and incremental compilation. so, IC and CI. |
23:28:08 | FromDiscord | <Elegant Beef> so it turns out my issue with the github api is that the sent request gets redirected and the redirection adds another oauth |
23:28:10 | FromDiscord | <Elegant Beef> So yaay |
23:28:32 | disruptek | github api? |
23:28:35 | FromDiscord | <Elegant Beef> yea |
23:28:39 | disruptek | mine or a different one? |
23:28:45 | FromDiscord | <Elegant Beef> the normal rest api |
23:28:49 | FromDiscord | <Elegant Beef> http requests |
23:28:59 | disruptek | !repo disruptek/github |
23:28:59 | disbot | https://github.com/disruptek/github -- 9github: 11github api v3 for nim 15 6⭐ 0🍴 |
23:29:02 | disruptek | this one? |
23:29:04 | FromDiscord | <Elegant Beef> No |
23:29:08 | * | FromGitter quit (Read error: Connection reset by peer) |
23:29:09 | FromDiscord | <Elegant Beef> Im using httprequests myself |
23:30:04 | FromDiscord | <Elegant Beef> trying to download an asset, and getting |
23:30:05 | FromDiscord | <Elegant Beef> Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified |
23:30:15 | FromDiscord | <Elegant Beef> Which is cause of their internal redirection |
23:31:34 | disruptek | my stuff works. try it! |
23:32:47 | FromDiscord | <Elegant Beef> i mean i need one thing |
23:33:01 | FromDiscord | <Elegant Beef> dont exactly need this large api for this single thing |
23:34:00 | FromDiscord | <Elegant Beef> and you're certain you're capable of getting an asset from a private repo to download with this? |
23:34:24 | disruptek | an asset? |
23:34:31 | disruptek | my signing/auth works. |
23:34:39 | FromDiscord | <Elegant Beef> A release file |
23:34:39 | disruptek | and i support the entire github v3 api. |
23:34:46 | leorize | well nim have dead code elimination, so a big module will end up small if you only use a tiny part of it |
23:34:50 | disruptek | choose your own adventure. |
23:34:58 | FromDiscord | <Elegant Beef> well i mean i have the url for the asset |
23:35:06 | FromDiscord | <Elegant Beef> it just wont let me download cause of their internal redirection |
23:35:16 | FromDiscord | <Elegant Beef> And assuming you're using httprequests, the same thing will happen |
23:35:25 | FromDiscord | <Elegant Beef> My oauth is working cause i get the releases |
23:35:30 | FromDiscord | <Elegant Beef> the issue is the downloading isnt working |
23:36:22 | disruptek | follow the white rabbit. |
23:36:32 | disruptek | s/white rabbit/302 redirect/ |
23:37:32 | FromDiscord | <Elegant Beef> i mean i dont get a 302 redirect, i get a 400 |
23:37:45 | FromDiscord | <Elegant Beef> cause of the authentication stacking |
23:41:40 | FromDiscord | <Elegant Beef> Like as soon as add the "Accept : application/octet-stream" it 400s, if i dont it 200s |