00:22:56 | * | d10n-work quit (Quit: Connection closed for inactivity) |
00:25:37 | * | rnrwashere quit (Remote host closed the connection) |
00:42:52 | * | rnrwashere joined #nim |
00:48:55 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:51:27 | * | rnrwashere quit (Remote host closed the connection) |
00:52:37 | * | vlad1777d joined #nim |
01:03:50 | * | rnrwashere joined #nim |
01:14:38 | * | rnrwashere quit (Remote host closed the connection) |
01:16:58 | * | rnrwashere joined #nim |
01:21:55 | * | rnrwashere quit (Remote host closed the connection) |
01:24:26 | * | rnrwashere joined #nim |
01:29:02 | * | rnrwashere quit (Remote host closed the connection) |
01:29:51 | * | rnrwashere joined #nim |
01:36:09 | * | rnrwashere quit (Remote host closed the connection) |
01:59:54 | * | vlad1777d quit (Ping timeout: 264 seconds) |
02:07:01 | * | banc quit (Quit: Bye) |
02:09:37 | * | rnrwashere joined #nim |
02:27:54 | * | banc joined #nim |
02:36:21 | * | arecacea1 quit (Remote host closed the connection) |
02:36:40 | * | arecacea1 joined #nim |
02:42:07 | * | rnrwashere quit (Remote host closed the connection) |
02:44:11 | * | rnrwashere joined #nim |
02:52:40 | * | rnrwashere quit (Remote host closed the connection) |
02:53:16 | * | rnrwashere joined #nim |
02:55:26 | * | rnrwashere quit (Remote host closed the connection) |
02:55:39 | * | rnrwashere joined #nim |
03:01:51 | * | Cthalupa quit (Ping timeout: 264 seconds) |
03:11:29 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:15:23 | * | Cthalupa joined #nim |
03:35:17 | * | rnrwashere quit (Remote host closed the connection) |
03:38:16 | * | rnrwashere joined #nim |
03:42:40 | * | rnrwashere quit (Remote host closed the connection) |
03:49:24 | * | dddddd quit (Quit: Hasta otra..) |
03:55:41 | * | rnrwashere joined #nim |
03:57:52 | * | rnrwashe_ joined #nim |
04:00:57 | * | rnrwashere quit (Ping timeout: 250 seconds) |
04:06:03 | * | rnrwashe_ quit (Remote host closed the connection) |
04:07:52 | * | rnrwashere joined #nim |
04:09:50 | * | rnrwashere quit (Remote host closed the connection) |
04:20:27 | * | nsf joined #nim |
04:20:27 | * | rnrwashere joined #nim |
04:23:07 | * | rnrwashere quit (Remote host closed the connection) |
04:23:29 | * | rnrwashere joined #nim |
04:24:12 | * | I_Right_I quit (Remote host closed the connection) |
04:24:27 | * | rnrwashe_ joined #nim |
04:27:43 | * | rnrwashere quit (Ping timeout: 252 seconds) |
04:28:11 | * | kapil____ joined #nim |
04:42:25 | * | noeontheend joined #nim |
04:47:22 | * | ryukoposting quit (Quit: WeeChat 1.6) |
04:48:11 | * | mwbrown quit (Ping timeout: 250 seconds) |
05:06:32 | * | noeontheend quit (Ping timeout: 268 seconds) |
05:08:27 | * | narimiran joined #nim |
05:36:13 | * | c3v0axz quit (Remote host closed the connection) |
05:36:32 | * | stefanos82 joined #nim |
05:36:33 | * | c3v0axz joined #nim |
05:55:35 | * | rnrwashe_ quit (Remote host closed the connection) |
05:56:18 | * | solitudesf joined #nim |
06:00:24 | * | krux02 joined #nim |
06:01:12 | * | jjido joined #nim |
06:10:59 | * | rnrwashere joined #nim |
06:23:14 | * | mwbrown joined #nim |
06:24:18 | * | rnrwashere quit (Remote host closed the connection) |
06:26:15 | * | pwntus quit (Remote host closed the connection) |
06:32:07 | * | PMunch joined #nim |
06:52:21 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:57:28 | * | pwntus joined #nim |
06:57:29 | * | pwntus quit (Changing host) |
06:57:29 | * | pwntus joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:47 | * | gmpreussner joined #nim |
07:05:43 | * | rayman22201 quit (Read error: Connection reset by peer) |
07:05:50 | * | nimblepoultry quit (Read error: Connection reset by peer) |
07:05:57 | * | rayman22201 joined #nim |
07:06:03 | * | nimblepoultry joined #nim |
07:06:04 | * | r4vi quit (Read error: Connection reset by peer) |
07:06:08 | * | l1x quit (Read error: Connection reset by peer) |
07:06:16 | * | r4vi joined #nim |
07:06:27 | * | l1x joined #nim |
07:06:29 | * | avsej quit (Quit: Quit) |
07:06:31 | * | dashed quit (Write error: Connection reset by peer) |
07:06:38 | * | avsej joined #nim |
07:06:39 | * | avsej quit (Changing host) |
07:06:39 | * | avsej joined #nim |
07:06:47 | * | dashed joined #nim |
07:33:52 | * | nc-x joined #nim |
07:35:17 | nc-x | strformat &"" used to automatically call `$`. It does not do that on latest devel, so I get a horrible type mismatch error. Intentional change or regression? |
07:36:50 | narimiran | krux02: ^ |
07:40:59 | * | Gertm left #nim ("Leaving") |
07:41:34 | nc-x | e.g. https://ghostbin.com/paste/6hq8h |
07:42:05 | nc-x | changing to $y gets it to work |
07:42:54 | * | nc-x quit (Quit: Page closed) |
07:44:49 | krux02 | nc-x, intentional change |
07:45:17 | krux02 | the implicit `$` causes a lot of unnecessary intermediate string allocations |
07:45:36 | krux02 | it is documented now how it works |
07:45:59 | krux02 | for types you want to work with in strfromat you need to overload formatValue |
07:47:48 | krux02 | and the error you get is supposed to be informative about what you need to do to fix it. |
07:47:49 | * | ng0 joined #nim |
07:49:35 | * | nc-x joined #nim |
07:49:54 | nc-x | krux02: 👍 |
07:49:58 | * | nc-x quit (Client Quit) |
07:51:39 | krux02 | I don't have that charactor on my system |
07:53:16 | * | nc-x joined #nim |
07:53:19 | narimiran | it's a thumb up :) |
07:53:27 | nc-x | ;D |
07:53:52 | * | nc-x quit (Client Quit) |
07:54:30 | krux02 | you can also do this: |
07:54:30 | krux02 | proc formatValue[T](result: var string; value: T; specifier: string) = result.add $T |
07:54:56 | krux02 | that will make strformat work with everything that has a $ operator defined |
07:56:05 | krux02 | the reason that it is not in the standard library is, that it hides a clean error message for you own types |
07:59:56 | krux02 | I just realized that the specifier in formatValue causes intermediate string allocations |
07:59:59 | krux02 | oh well |
08:08:59 | FromGitter | <mratsim> maybe it should be in sugar/typetraits/leniontops or some kind of "easy" library like that |
08:09:30 | FromGitter | <mratsim> or in the strformat documentation |
08:14:47 | * | c3v0axz quit (Ping timeout: 240 seconds) |
08:23:04 | * | Vladar joined #nim |
08:46:31 | * | floppydh joined #nim |
08:54:43 | * | jjido joined #nim |
08:58:11 | * | chickendan joined #nim |
09:00:06 | Araq | er ... that's a pretty breaking change, I wasn't really aware |
09:00:20 | Araq | why can't it use '$'? |
09:00:29 | Araq | as a fallback? |
09:00:56 | Araq | strformat.$ is all about convenience... |
09:01:04 | Araq | strformat.& is all about convenience... |
09:45:22 | * | abm joined #nim |
09:50:34 | FromGitter | <mratsim> Btw, when is this session ACCU session on Nim hot code reloading: https://conference.accu.org/2019/sessions.html#XNimthefirstnativelycompiledlanguagewithfullsupportforhotcodereloadingatruntime? |
09:54:37 | * | nc-x joined #nim |
09:54:59 | nc-x | https://stackoverflow.com/questions/55549241/translating-2014-nim-to-2019-nim |
09:56:06 | nc-x | I think it is related to the ACCU nim slides |
09:56:44 | * | nc-x quit (Client Quit) |
09:57:56 | * | nc-x joined #nim |
09:58:17 | FromGitter | <mratsim> right |
09:58:19 | nc-x | And according to https://conference.accu.org/2019/schedule.html, the nim presentation will be tomorrow |
09:59:31 | nc-x | i.e. Saturday 2019-04-13 |
09:59:38 | * | nc-x quit (Client Quit) |
10:13:40 | FromGitter | <kaushalmodi> krux02: I just realized that breaking strformat change :( |
10:14:15 | FromGitter | <kaushalmodi> I have a custom object type and I cannot use strformat for that .. need to resort to echo and $ |
10:14:59 | FromGitter | <kaushalmodi> strformat is a great convenience.. it would be bad if we need to define formatString for every little object type I have. |
10:17:06 | Zevv | or just use $ in the {}s |
10:17:15 | FromGitter | <kaushalmodi> I stumbled across this issue just yesterday: I couldn't use fmt to print that sElem I have in this code: https://github.com/kaushalmodi/nim-systemverilog-dpic/blob/5fcf08baef82a75ce8e3ad70b34a3b54474a0383/inp_outp_both_nested_struct_matlab/libdpi.nim#L23 |
10:17:40 | FromGitter | <kaushalmodi> So in that line I resort to echo and $ |
10:17:59 | FromGitter | <mratsim> why not $yourInstance? |
10:18:17 | FromGitter | <mratsim> in &"{$yourObject}" |
10:18:49 | FromGitter | <mratsim> though the syntax is getting a bit verbose |
10:18:51 | FromGitter | <kaushalmodi> I think I tried `echo fmt"{$sElem}" ` but it kept on saying that sElem was undefined (or something like that). |
10:19:13 | FromGitter | <mratsim> ah, macro/mixin/early resolution issu |
10:19:15 | FromGitter | <kaushalmodi> Let me try it again later today when I get to the computer |
10:20:26 | FromGitter | <mratsim> Those early symbol resolution issues are really annoying, bluenote10 and me have a bug raised, mine is closed and was agains &, bluenote10 has a new one |
10:20:46 | FromGitter | <kaushalmodi> You guys means that using `&` (instead of `fmt`) with `$sElem` would work? |
10:21:02 | FromGitter | <kaushalmodi> .. or may be not if this this the early resolution issue |
10:21:03 | FromGitter | <mratsim> maybe |
10:21:10 | FromGitter | <kaushalmodi> Can you point me to the issue? |
10:21:17 | FromGitter | <mratsim> maybe symbol resolution was only fixed for & and not for fmt |
10:21:34 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/7632 |
10:21:42 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/10977 |
10:27:02 | FromGitter | <kaushalmodi> Thank you. |
10:27:59 | FromGitter | <kaushalmodi> The latter issue looks like a different issue than mine because I am called fmt inside a proc |
10:28:09 | FromGitter | <kaushalmodi> But I am getting the same error .. |
10:29:34 | FromGitter | <kaushalmodi> Or is the iterator returned var in a `for` loop behave the same as a template? |
10:29:49 | FromGitter | <kaushalmodi> s/is/does |
10:38:20 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
10:55:39 | * | dddddd joined #nim |
11:22:37 | * | jjido quit (Quit: Connection closed for inactivity) |
11:23:36 | shashlick | @Araq @dom96 ran into the first roadblock of the compiler removal effort for nimble |
11:24:26 | shashlick | The switch and setCommand flags need to be communicated back from Nim to nimble |
11:25:29 | shashlick | They will have to come out of stdout or some such fashion. Any feedback or ideas appreciated |
11:26:17 | * | Snircle joined #nim |
11:27:18 | Araq | shashlick, hmmm |
11:28:32 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:28:47 | Araq | kaushalmodi: we're fixing it |
11:31:44 | Araq | shashlick, ignoring the setCommand problem, how does it work? |
11:32:08 | Araq | Nimble calls 'nim command project.nimble' ? |
11:38:09 | shashlick | Nimble runs the nimble file and let's it influence the switches and command and then uses those changes when it runs build and install commands |
11:41:02 | shashlick | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L203 |
11:41:20 | Araq | lol no |
11:41:54 | Araq | I wrote this file, I know how Nimble currently works |
11:42:23 | Araq | I'm asking how you expect it to work |
11:46:26 | FromGitter | <kaushalmodi> Araq: Thanks! Looking forward to that strformat fix |
11:47:05 | FromGitter | <kaushalmodi> btw I don't know if many folks would be interested by I presented to about a dozen people on using Nim with SystemVerilog at a industry-local conference: https://www.dropbox.com/s/3wvpe1ccqsbu4uc/CDNLive_2019_Nim_DPI-C_SystemVerilog_FINAL.pptx?dl=0 |
11:48:34 | Araq | nice :-) |
11:48:42 | FromGitter | <kaushalmodi> this repo is my ongoing experimentations on getting more data types to get across between SV and Nim: https://github.com/kaushalmodi/nim-systemverilog-dpic |
11:48:59 | FromGitter | <kaushalmodi> hopefully I can start using Nim at a larger scale with my team at work |
11:49:52 | FromGitter | <kaushalmodi> just tying this effort with the strformat issue I mentioned earlier at https://github.com/kaushalmodi/nim-systemverilog-dpic/blob/master/inp_outp_both_nested_struct_matlab/libdpi.nim#L23 |
11:53:05 | Araq | any opinion on https://github.com/nim-lang/RFCs/issues/144 ? |
11:53:12 | Araq | @kaushalmodi |
11:54:16 | FromGitter | <kaushalmodi> Araq: I thought the owned ref concept was out of my domain/expertise. But still, let me read through the RFC. |
11:54:22 | * | seni joined #nim |
11:58:16 | FromGitter | <danielecook> Does anyone know how to continue/skip within interation? |
11:58:19 | FromGitter | <danielecook> e.g. continue |
11:58:40 | FromGitter | <liquid600pgm> it's just `continue` |
11:58:56 | FromGitter | <danielecook> lol ok sorry...I was looking for the docs on it and should've just tried |
11:59:53 | FromGitter | <kaushalmodi> @danielecook docs are also there: https://nim-lang.github.io/Nim/tut1.html#control-flow-statements-continue-statement |
12:00:50 | narimiran | @kaushalmodi i just went through your presentation - nice job there! what were the reactions from the audience? were there any interesting questions or remarks? |
12:01:23 | FromGitter | <kaushalmodi> Folks were surprised to learn that Nim existed. |
12:02:24 | FromGitter | <kaushalmodi> Questions were on how crashes were handled in Nim etc. |
12:02:34 | FromGitter | <kaushalmodi> (though I mentioned exception handling in the presentation) |
12:03:17 | FromGitter | <kaushalmodi> Also many of the audience didn't know that SystemVerilog could talk to C .. so .. |
12:03:32 | FromGitter | <kaushalmodi> hopefully I get a better audience in a future presentation |
12:03:39 | FromGitter | <kaushalmodi> :) |
12:03:48 | narimiran | :D |
12:05:05 | FromGitter | <kaushalmodi> Been busy with work/life so couldn't share the slides before my talk (my worked on my slides on the 6 hr flight from US east to west coast) |
12:05:22 | FromGitter | <kaushalmodi> but still let me know how things could be improved in those slides |
12:06:47 | Calinou | "Folks were surprised to learn that Nim existed." -> always happens when I mention it to people IRL :P |
12:06:49 | FromGitter | <kaushalmodi> shashlick: nimterop is mentioned in the slides I linked above :) |
12:06:58 | Calinou | even though I sometimes wear a Nim t-shirt :p |
12:07:05 | FromGitter | <kaushalmodi> thanks for your ongoing support with nimterop |
12:07:40 | FromGitter | <kaushalmodi> narimiran: but looks like I taught a bit of Nim syntax to the audience |
12:07:50 | FromGitter | <kaushalmodi> I got the chuckles I expected on slide 41 ;-) |
12:08:54 | shashlick | Araq - I'll be spawning nim e process and then detect any command changes with get command before returning |
12:09:09 | shashlick | Wondering if switches can be detected as well |
12:09:40 | shashlick | Then need to communicate those back to nimble either via stdout or a temp file |
12:10:06 | shashlick | Then subsequent commands in the same run will be able to run like they do today |
12:10:35 | shashlick | I'm just curious if there's a better way to do this cause this isn't pretty |
12:10:44 | shashlick | @kaushalmodi awesome! Will check it out |
12:13:33 | FromGitter | <kaushalmodi> btw is there a way to iterate through fields in an object and also fetch the field names? |
12:13:59 | FromGitter | <mratsim> @kaushalmodi slide 19 SysVerilog byte, C char, Nim: byte or char or uint8 not just uint8 |
12:14:07 | FromGitter | <mratsim> fieldPairs |
12:14:19 | FromGitter | <mratsim> it's compile-time unrolled |
12:14:20 | FromGitter | <kaushalmodi> ah! thanks |
12:14:36 | FromGitter | <mratsim> slide 18* sorry |
12:14:38 | FromGitter | <kaushalmodi> I was using `.fields` and was wondering why pairs wasn't implemented |
12:15:01 | FromGitter | <Grabli66> Hi! Is there a setting to turn off discard checking? |
12:15:20 | FromGitter | <liquid600pgm> declare your procs with the `{.discardable.}` pragma |
12:15:23 | FromGitter | <mratsim> you can add {.discardable.} pragma to your proc |
12:16:31 | FromGitter | <kaushalmodi> @mratsim thanks for that note about byte/char/uint8 equivalency |
12:17:49 | FromGitter | <Grabli66> @liquid600pgm , @mratsim , maybe there is some global setting? I can't add that pragma to the existing system API :) |
12:18:11 | FromGitter | <mratsim> use a wrapper |
12:18:18 | shashlick | Nice work @kaushalmodi |
12:18:55 | FromGitter | <Grabli66> Ok. I am doomed :) |
12:19:12 | FromGitter | <mratsim> if it's system API, I suppose it comes from C, you can tag a importc with discardable |
12:19:38 | FromGitter | <mratsim> it's a feature, not checking the error should be explicit. |
12:19:38 | FromGitter | <Grabli66> I mean nim's system api |
12:20:04 | FromGitter | <liquid600pgm> why do you need implicit discards? |
12:20:17 | FromGitter | <kaushalmodi> @mratsim yes, about discardable during importc |
12:20:20 | FromGitter | <liquid600pgm> I consider this to be a good feature that prevents bugs |
12:20:27 | FromGitter | <mratsim> import mysystem ⏎ ⏎ proc myFoo() = ⏎ discard mysystem.myfoo() [https://gitter.im/nim-lang/Nim?at=5cb0828a93fb4a7dc2183f75] |
12:20:28 | FromGitter | <kaushalmodi> coincidentally it's in slide 48 :) |
12:20:53 | FromGitter | <mratsim> and you can import mysystem except myfoo where needed :p |
12:21:18 | FromGitter | <kaushalmodi> (https://files.gitter.im/nim-lang/Nim/F5I9/image.png) |
12:22:00 | FromGitter | <mratsim> slide 23, you shouldn't explicitly pass by ref @kaushalmodi |
12:22:12 | FromGitter | <mratsim> use ref when you need reference semantics not for optimisation |
12:22:31 | * | solitudesf quit (Ping timeout: 268 seconds) |
12:22:35 | FromGitter | <Grabli66> Ok. It's sad :( |
12:22:51 | FromGitter | <mratsim> when a stack types is bigger than 3 pointers size (24 bytes on x64) it will automatically be passed via pointers |
12:22:51 | FromGitter | <kaushalmodi> about slide 23: SystemVerilog passes that arg by reference from C side |
12:23:05 | FromGitter | <kaushalmodi> so I need to fetch that by ref on Nim side |
12:23:12 | FromGitter | <mratsim> you can easily check in the C codegen |
12:23:30 | FromGitter | <kaushalmodi> I cannot see the C code that the systemverilog compiler created |
12:23:41 | FromGitter | <mratsim> in that case you should use type Animal {.byref, importc: Animal.} = object |
12:24:21 | FromGitter | <kaushalmodi> hmm, never heard of the byref pragma .. need to learn about it |
12:24:22 | FromGitter | <mratsim> this way it will always be passed via pointers |
12:24:41 | FromGitter | <kaushalmodi> understood, so that Animal type will automatically be a ref type? |
12:25:04 | FromGitter | <mratsim> no |
12:25:07 | FromGitter | <kaushalmodi> but the thing is .. I don't know the type the systemverilog created |
12:25:13 | FromGitter | <mratsim> a stack type but passed by pointer for function calls |
12:25:35 | FromGitter | <kaushalmodi> i.e. I don't know the exact name of the C type that SV created for the animal_s structure in systemverilog |
12:25:39 | FromGitter | <kaushalmodi> I hope that makes sense .. |
12:26:03 | Zevv | proc disarm(x: typed) = x = nil :) |
12:26:04 | FromGitter | <kaushalmodi> the C equivalent types for the code I have in systemverilog is hidden |
12:26:23 | FromGitter | <mratsim> well the important point is that, ref should be used when you want reference semantics or the GC for lifetimes purposes |
12:26:38 | FromGitter | <kaushalmodi> so using ptr would be better? |
12:26:55 | Araq | do what c2nim does |
12:27:16 | FromGitter | <mratsim> if it's just making sure that a type is copied for proc call (for FFI), you can use byval pragma, if it's to make sure that it's not copied use byref |
12:27:41 | FromGitter | <kaushalmodi> @mratsim I cannot importc the types from my SV code |
12:27:49 | FromGitter | <kaushalmodi> I can importc only the procs |
12:28:03 | shashlick | Araq - so what's your thought? I'll need a getSwitches call in nimscript to get that info |
12:28:11 | FromGitter | <mratsim> then I think ptr makes more sense |
12:28:31 | FromGitter | <mratsim> not too sure without seeing more |
12:28:45 | FromGitter | <kaushalmodi> ok, let me experiment |
12:28:55 | * | nc-x joined #nim |
12:29:28 | FromGitter | <mratsim> ref shouldn't be exported in C in my opinion |
12:29:29 | nc-x | Araq: with --newruntime, nimrtl wouldn't be required, right? (because no gc) |
12:31:23 | FromGitter | <kaushalmodi> @mratsim that formatValue breaking change on devel is breaking my working snippets :( |
12:31:27 | FromGitter | <kaushalmodi> expression: formatValue(fmtRes413463, animalAddr[], "") |
12:31:37 | FromGitter | <mratsim> :/ |
12:31:53 | nc-x | and if so, then does it make sense to make --newruntime the default for v1, and --oldruntime switch for opt-out. Because that would fix the nimrtl bugs, so more stability for dlls and hotcodereloading as well. |
12:32:03 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cb08543759abc043cac7c84] |
12:32:08 | FromGitter | <mratsim> there is no slide 48? |
12:32:27 | FromGitter | <kaushalmodi> @mratsim oh, it's hidden |
12:32:37 | FromGitter | <kaushalmodi> you should see it if you open it in powerpoint |
12:32:51 | FromGitter | <mratsim> ah, I haven't install powerpoint:p |
12:33:08 | FromGitter | <kaushalmodi> it basically that screenshot/image I shared above |
12:33:24 | FromGitter | <kaushalmodi> https://gitter.im/nim-lang/Nim?at=5cb082beb34ccd69e7a74a3a |
12:33:56 | FromGitter | <mratsim> anyway very nice presentation |
12:34:22 | FromGitter | <kaushalmodi> thanks :) You get to see the view of Nim from EE background |
12:35:17 | Araq | nc-x, --newruntime is way too experimental for that, but it helps for nimrtl.dll problems. A bit. If you use -d:useMalloc and your malloc implementation happens to be in a DLL |
12:35:48 | Araq | shashlick, I would accept patches to the compiler that dump stuff to stdout |
12:37:28 | shashlick | Araq: okay, if you have any cleaner ideas or preferences to communicate between procs, please let me know |
12:37:37 | shashlick | i'll proceed with this assumption |
12:40:50 | FromGitter | <kaushalmodi> opened issue here: https://github.com/nim-lang/Nim/issues/11012 |
12:45:39 | * | mal``` quit (Quit: Leaving) |
12:46:28 | * | mal`` joined #nim |
12:52:15 | * | nc-x quit (Ping timeout: 256 seconds) |
13:00:22 | * | believer joined #nim |
13:01:20 | * | chickendan quit (Quit: Quit) |
13:01:55 | believer | hi, are you (the nim devs) interested in a Pr to interface the canvas api in dom module? |
13:02:20 | * | believer is now known as b3liever |
13:02:54 | * | shomodj joined #nim |
13:05:07 | b3liever | or parts of it |
13:07:45 | FromGitter | <mratsim> not a webdev but I would have a base type for the dom so that everyone agrees on it and the rest can be done as a nimble library |
13:08:26 | Araq | b3liever, we have dom.nim in the stdlib and it received some love (taken from Karax) |
13:08:47 | Araq | but I think this should go into 'jscanvas.nim' |
13:09:51 | b3liever | sure I can do that |
13:09:58 | Araq | ty |
13:15:49 | krux02 | kaushalmodi, the formatValue is designed that you should provide your own overloads of formatValue for your custom types. |
13:15:59 | krux02 | THe fix to get it working is minimal |
13:16:01 | * | ghidra joined #nim |
13:16:07 | krux02 | proc formatValue(result: var string; value: Animal; specifier: string): void = |
13:16:07 | krux02 | result.add $value |
13:16:53 | FromGitter | <mratsim> custom types already define their own `$` |
13:17:38 | narimiran | `echo &"Received {$animalAddr[]}"` does the trick (adding `$`), but yeah, it is a breaking change |
13:18:59 | krux02 | no don't add $ |
13:20:39 | krux02 | I would overload ``formatValue(result: var string; value: AnimalRef; specifier: string)`` |
13:20:57 | krux02 | I am sorry for this breaking change, it was not properly communicated. |
13:21:59 | FromGitter | <mratsim> My main issue is that now, we need 2 overloads for formatting, `$` and `formatValue` |
13:22:25 | FromGitter | <mratsim> why isn't overloading `$` enough, why would bringing another overload be necessary |
13:25:04 | FromGitter | <mratsim> For example the complex std lib doesn't define formatValue - https://github.com/nim-lang/Nim/blob/devel/lib/pure/complex.nim#L348-L350 so everyone would need to define it. |
13:26:27 | FromGitter | <mratsim> So the question boils down to how often do we define different representation of a type when doing "echo" or when interpolating with strformat. |
13:26:52 | FromGitter | <alehander42> i think it should be possible to use `$` when formatValue is not defined |
13:27:09 | FromGitter | <alehander42> and to override it with formatValue for optimization/special cases |
13:27:26 | FromGitter | <alehander42> but otherwise its a good idea to have formatValue for some cases |
13:27:54 | FromGitter | <mratsim> for special cases, the custom type can easily have a toCustomRepr(a: MyType): string proc |
13:28:13 | Araq | &"{x}" is Python's f"{x}", as far as it's reasonable |
13:28:20 | FromGitter | <mratsim> and "{a.toCustomRepr}" works |
13:28:24 | Araq | Python uses __str__ so & should use $ |
13:29:13 | FromGitter | <mratsim> yes, this is much better than &"{$x}" |
13:29:24 | Araq | and that's the end of the discussion for me. it was introduced for Python-like convenience |
13:29:56 | Araq | I even run Python example programs to ensure the non-documented edge cases work |
13:30:39 | Araq | *ran |
13:50:21 | * | rnrwashere joined #nim |
13:52:01 | * | PMunch quit (Remote host closed the connection) |
14:00:46 | * | chickendan joined #nim |
14:01:06 | * | b3liever quit (Quit: Konversation terminated!) |
14:01:15 | * | Minimisthupper joined #nim |
14:02:09 | * | pwntus quit (Quit: Leaving) |
14:05:06 | * | xylef joined #nim |
14:05:30 | * | xylef quit (Client Quit) |
14:07:06 | * | xylef joined #nim |
14:07:41 | * | xylef quit (Client Quit) |
14:15:47 | * | xylef joined #nim |
14:20:36 | * | nsf quit (Quit: WeeChat 2.4) |
14:26:38 | * | d10n-work joined #nim |
14:32:56 | * | Trustable joined #nim |
14:34:12 | * | arecacea1 quit (Remote host closed the connection) |
14:34:31 | * | arecacea1 joined #nim |
14:42:49 | * | rnrwashere quit (Remote host closed the connection) |
14:43:41 | * | rnrwashere joined #nim |
14:46:33 | * | solitudesf joined #nim |
14:47:40 | * | ng0 joined #nim |
14:48:50 | * | floppydh quit (Quit: WeeChat 2.4) |
14:49:13 | * | rnrwashere quit (Remote host closed the connection) |
15:10:14 | * | rnrwashere joined #nim |
15:11:36 | Araq | hey, it's Friday evening. What stdlib module do you want to work with --newruntime? |
15:12:49 | Araq | ported: terminal, os, strutils, times, parseopt |
15:16:03 | FromGitter | <mratsim> strutils :O you think you will be able to finish before next month? :P |
15:16:44 | * | kapil____ quit (Quit: Connection closed for inactivity) |
15:16:44 | * | rnrwashere quit (Remote host closed the connection) |
15:19:10 | * | lrz_phone joined #nim |
15:19:51 | lrz_phone | Araq: can koch be compiled with newruntime now? |
15:22:58 | * | rockcavera quit (Ping timeout: 250 seconds) |
15:23:07 | lrz_phone | so far the compiler keep segfaulting when compiling koch on linux |
15:23:20 | FromGitter | <alehander42> btw i wanted to get some early critique on some of our new tools: http://github.com/metacraft-labs/languist (also ruby-deduckt and a newer py2nim, ruby2nim based on languist) : this time i have a bigger example project with some working translations: https://github.com/metacraft-labs/fast-rubocop (the files in `cop/` are translated, the other ones are manually ported infrastructure) |
15:23:40 | FromGitter | <nc-x> @Araq: pm'ed you on Gitter. please check. |
15:26:18 | FromGitter | <kayabaNerve> If I create an array[32, byte], is it 0'd out or is that not guaranteed? |
15:26:29 | FromGitter | <nc-x> zeroed out |
15:26:35 | FromGitter | <nc-x> AFAIK |
15:26:51 | FromGitter | <nc-x> zero initialization is guaranteed unless you opt out using some pragma |
15:30:05 | Araq | lrz_phone, worked for me yesterday |
15:30:10 | FromGitter | <kayabaNerve> Thanks @nc-x |
15:30:27 | FromGitter | <kayabaNerve> My only other question is if Nim exceptions, when using the C++ backend, are zero-cost. |
15:31:12 | FromGitter | <kayabaNerve> (as in the performance of code in a try catch that doesn't throw is the same as the performance of the code without said try catch) |
15:31:19 | FromGitter | <nc-x> IIRC according to Araq, yes. |
15:31:30 | Araq | yes, we map Nim's try to C++'s try |
15:32:06 | FromGitter | <kayabaNerve> Thanks |
15:32:45 | shashlick | Araq how about tables, sets, hashes |
15:33:04 | lrz_phone | Araq: I've just tried with latest devel, still segfaulting |
15:33:22 | lrz_phone | do you need a stacktrace? |
15:35:11 | Araq | strange |
15:35:18 | Araq | it used to work, now it fails for me too |
15:35:49 | Araq | lesson: if it's not part of the CI, it's broken :P |
15:39:28 | * | stefanos82 quit (Remote host closed the connection) |
15:39:58 | lrz_phone | :p |
15:42:09 | FromGitter | <nc-x> @Araq toTable() crashes on --newruntime with ``t.destructor != nil` [AssertionError]`. Should I open an issue? |
15:48:30 | FromGitter | <nc-x> https://github.com/nim-lang/Nim/issues/11014 |
15:51:16 | * | believer joined #nim |
16:01:43 | * | rnrwashere joined #nim |
16:09:42 | * | rnrwashere quit (Remote host closed the connection) |
16:13:54 | * | believer quit (Quit: Konversation terminated!) |
16:14:24 | * | xylef quit (Quit: WeeChat 2.4) |
16:14:45 | * | Minimisthupper quit (Quit: Konversation terminated!) |
16:17:47 | * | ghidra quit (Quit: Page closed) |
16:21:10 | * | abm quit (Ping timeout: 268 seconds) |
16:45:41 | * | rnrwashere joined #nim |
16:49:08 | * | jjido joined #nim |
16:53:49 | * | rnrwashere quit (Remote host closed the connection) |
17:06:53 | * | Tyresc joined #nim |
17:07:45 | * | rnrwashere joined #nim |
17:13:43 | * | rnrwashere quit (Remote host closed the connection) |
17:13:59 | * | lrz_phone quit (Ping timeout: 246 seconds) |
17:20:05 | * | rnrwashere joined #nim |
17:25:42 | * | jjido_ joined #nim |
17:32:47 | * | mal`` quit (Quit: Leaving) |
17:37:47 | * | mal`` joined #nim |
17:46:42 | * | xylef joined #nim |
17:55:53 | * | ryukoposting joined #nim |
18:10:14 | * | rnrwashere quit (Remote host closed the connection) |
18:11:19 | * | stefanos82 joined #nim |
18:19:34 | dom96 | Hello all, how's everyone doing? |
18:20:28 | FromDiscord | <hotdog> Doing well! How are you Dom? |
18:20:46 | dom96 | Alright. Could be better |
18:22:55 | FromDiscord | <hotdog> Bad day? |
18:24:21 | ryukoposting | what's crackin dom |
18:24:40 | * | Trustable quit (Remote host closed the connection) |
18:25:00 | dom96 | Nah, just feeling like I'm not in touch with you all these days. Working full-time sucks :) |
18:25:25 | ryukoposting | don't be worried about that, man |
18:26:03 | shashlick | @dom96 - while you are here, can you take a look at my conversation with Ara-q earlier in the morning about the effort to remove the compiler from nimble? |
18:26:05 | FromDiscord | <hotdog> Ah! Where are you working? |
18:26:19 | dom96 | hotdog: FB |
18:26:33 | ryukoposting | cali? |
18:26:41 | FromDiscord | <hotdog> Framebuffer |
18:26:46 | FromDiscord | <hotdog> Facebook? |
18:27:20 | dom96 | London |
18:27:50 | ryukoposting | >frame buffer |
18:28:29 | ryukoposting | I'm gonna make an embedded graphics company called framebuffer and its logo is gonna just be an upside down facebook logo with with the colors inverted |
18:29:31 | ryukoposting | dom96 don't get yourself down over having to deal with real life, we all have to one way or another |
18:29:48 | rayman22201 | lol. specializing in corrupted frame buffers since 2019 :-P |
18:30:04 | FromDiscord | <hotdog> Oh cool, I'm in London too |
18:30:18 | FromDiscord | <hotdog> @ryukoposting hah, that logo sounds perfect |
18:30:24 | dom96 | hotdog: :o |
18:30:30 | rayman22201 | I feel your pain dom96! I wish I could be working Nim instead of my day job all the time :-) |
18:30:41 | dom96 | Really need to get that meet up going. There is at least one other person in London that uses Nim as well |
18:31:07 | FromDiscord | <hotdog> Fancy a pint? |
18:31:14 | FromDiscord | <hotdog> Yeah a London meetup would be cool |
18:31:19 | ryukoposting | man, the only reason I have time to shitpost in the nim IRC is because I'm in college. I'm a lab assistant right now, but this summer I'll be working 40hr weeks again |
18:31:25 | FromDiscord | <hotdog> There must be a few of us here |
18:35:49 | dom96 | shashlick, couldn't you just make the script output some JSON? {"setCommand": "build"}? |
18:39:23 | shashlick | that's what I'm thinking but wanted your opinions on it since it's not pretty |
18:39:46 | shashlick | so far it is just setCommand and switch, might be more such stuff |
18:40:00 | dom96 | What's the alternative? I don't understand why Araq was wanting you to modify the compiler, can you explain? |
18:40:05 | Araq | shashlick: oh yeah json is ok |
18:40:26 | * | rnrwashere joined #nim |
18:40:55 | shashlick | well, so right now, you run setCommand but getCommand doesn't give you the projectname back |
18:41:02 | shashlick | also, you can set switch but cannot get it back |
18:41:19 | shashlick | i'm considering writing overrides in nimscriptapi.nim so it will use those instead of the nimscript defaults |
18:41:27 | shashlick | so don't need any compiler changes |
18:41:50 | dom96 | yeah, this should all be doable via stdin/stdout |
18:42:09 | FromGitter | <alehander42> We have to make nimconf |
18:42:18 | shashlick | so nimble does print stuff from those tasks so will have to filter the stuff out |
18:42:21 | FromGitter | <alehander42> In London ⏎ With all the London nimmere |
18:43:45 | dom96 | @alehander42: for a second I thought you wanted yet another Nim configuration file format, damn I'm tired :) |
18:44:06 | dom96 | shashlick, filter what? |
18:45:49 | shashlick | so if the nimble task prints stuff out, we will have to filter that out from any json we generate |
18:45:55 | shashlick | and print that to the user |
18:46:27 | dom96 | hm, are we really 5 issues away from v1? :P https://github.com/nim-lang/Nim/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1 |
18:46:47 | dom96 | Seems two of those are my issues |
18:48:21 | dom96 | shashlick, oh I see. This should be behind an API anyway to be honest, so that it's using Nimble's nice output formatting |
18:48:51 | dom96 | So I would error out if the output from the script cannot be parsed as valid JSON |
18:49:09 | dom96 | (You could even just check if it starts with `{`) |
18:51:01 | * | al_t_ joined #nim |
18:51:01 | * | al_t_ is now known as al_ |
18:52:17 | * | abm joined #nim |
18:53:25 | dom96 | I've envisioned for a while now an API that allows things like: nimble.output("Processing", "foo.c", MediumPriority) (mirroring the Nimble cli module's functions) and more advanced things like nimble.getOpt, nimble.install("jester#head"), nimble.build("~/my.pkg/") etc. |
18:53:50 | * | rnrwashere quit (Remote host closed the connection) |
18:54:12 | shashlick | okay i'll look into that |
18:54:29 | shashlick | but fact is .nimble writers can echo whatever they want and we need to work with that legacy |
18:54:46 | shashlick | so stdout cannot be affected, perhaps this api can come out of stderr? |
18:55:03 | dom96 | yeah, feel free to do that |
18:55:15 | dom96 | you could also override the nimscript `echo` somehow |
18:55:25 | Araq | hmmm |
18:55:39 | shashlick | that's an idea |
18:56:05 | dom96 | I would personally like to make the usage of it an error in the future (so we need a deprecation path here), this will make that easier |
18:56:23 | Araq | why don't we compile the .nimble file? |
18:56:45 | Araq | add some "import nimscriptapi" line at the top and compile it |
18:57:24 | Araq | 'setCommand' would be covered by the nimscriptapi |
18:57:48 | dom96 | yeah, I thought that was the idea, can't remember if we decided against it or not |
18:58:11 | Araq | I think we simply forgot and shashlick now tries 'nim e ...' |
18:58:23 | Araq | but I'm proposing 'nim c -r ...' |
18:58:41 | Araq | (also 'nim c -r' should cache the results, by default, will implement that) |
18:59:08 | * | nsf joined #nim |
18:59:42 | shashlick | one challenge is that the nims or compiled binary needs to sit in same dir since there could be relative imports |
18:59:55 | shashlick | e.g. nimble imports its version info into the nimble file |
19:00:48 | * | rnrwashere joined #nim |
19:01:35 | * | rnrwashere quit (Remote host closed the connection) |
19:01:36 | Araq | huh, you mean the .nimble file is so complex that is imports helper modules? |
19:01:51 | Araq | but even that wouldn't matter, the Nim compiler compiles it, done. |
19:03:22 | shashlick | here's another one - is it possible to import nimscript in the compiled binary? (trying) |
19:03:35 | shashlick | else we will have to reimplement that stuff so that existing scripts don't break |
19:03:55 | shashlick | nope - cannot import nimscript |
19:05:44 | * | jjido_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:09:44 | dom96 | Crazy idea: Forget about the version imports (just use defines as suggested by samdmarshall), create a parser for the meta data that's always defined in Nimble files, extract each `task` into a separate Nim file that gets compiled when executed |
19:12:15 | * | narimiran quit (Remote host closed the connection) |
19:13:23 | shashlick | so trying to understand here - we can remove the version imports from nimble's nimble file, but what about the others? |
19:13:27 | shashlick | existing legacy |
19:13:53 | shashlick | i already have written code to convert a modern nimble file into the legacy ini file so existing code can be used to parse the meta data |
19:15:11 | dom96 | nimble already has code to do that |
19:15:45 | shashlick | yes i'm using that to read |
19:15:58 | shashlick | just wrote some minimal code to write it out |
19:16:09 | dom96 | `nimble dump` writes it out IIRC |
19:16:23 | * | ptdel joined #nim |
19:17:24 | shashlick | ya but right now it is being read out of the VM, this just simply prints it out to stdout like we discussed earlier |
19:17:36 | ptdel | Has anybody here worked with nim on RHEL/CentOS before? Trying to account for some problems building with very old system libraries :( |
19:17:43 | shashlick | anyway, what's the benefit of separate exes for tasks? |
19:18:01 | dom96 | Speed |
19:19:01 | ryukoposting | I'm hoping nim will play nice with old versions of glibc and openSSL, will be very helpful for awsome |
19:19:05 | ptdel | trying to use nim's awslambda library to run lambdas in aws, but they use an old environment with openssl 1.0.2k and glibc 2.17 in it :( |
19:19:31 | shashlick | but why separate exes in tasks? anyway most nimble files have just a couple tasks if any |
19:19:53 | shashlick | alsol how do we handle the nimscript procs which aren't available at runtime |
19:20:17 | shashlick | @ryukoposting - check out nightlies builds for linux - being done on holy build box so the binary runs on many linux distros |
19:21:36 | ptdel | shashlick: is there a preferred crypto lib you use? nimcrypto is really nice but not backwards compat with old openssl libs |
19:21:46 | dom96 | ptdel, what issues are you seeing? |
19:22:21 | dom96 | shashlick, that detail doesn't really matter, you can put all the tasks in one exe too |
19:24:12 | shashlick | @ptdel - also what functionality are you looking for |
19:24:31 | ptdel | shashlick dom96 it's kind of specific so bear with me here lol: |
19:24:56 | ptdel | aws has a environment for executing code, it's like docker or nspawn, and you just submit a .zip with your binary and it runs it in it's environment |
19:25:24 | ptdel | the problem i'm running into is that the environment is a very old linux kernel, glibc version, and openssl version. the nim `nimcrypto` lib isn't compat with the env's openssl libs |
19:25:41 | ptdel | so i'm trying to find a way to compile this binary for glibc 2.17 and openssl 1.0.2k :( |
19:26:06 | ptdel | essentially, i'm in an env where `-d:ssl` is not possible :( |
19:26:08 | shashlick | check out dockcross or holy build box |
19:26:29 | ptdel | i have no control over the env is the problem. I either dynamically link and package my .so's with my binary, or statically link a binary |
19:26:33 | shashlick | look into statically compiling it in so you don't need to depend on the env |
19:26:47 | dom96 | why can't you use openssl 1.0.2k? |
19:26:47 | ptdel | but packaging and dynamically linking glibc is problematic :-p |
19:26:52 | dom96 | If it's dynamically linked it should be fine |
19:26:57 | ptdel | dom96: nimcrypto doesn't seem backwards compat with it |
19:26:59 | * | Vladar quit (Remote host closed the connection) |
19:27:03 | shashlick | not really, those two i mentioned made it super easy |
19:27:14 | dom96 | for an older glibc you'll need to compile on an older linux (or use some other methods) |
19:27:15 | shashlick | i could build a cross distro nim package for linux in 2 days |
19:27:27 | ptdel | nimcrypto wants a version of openssl that isn't present, and if i supply my own libcrypto.so stuff, that version can't use the glibc version if that makes sense |
19:27:54 | dom96 | I see. Maybe you could hack nimcrypto to support the old version? |
19:28:14 | * | rnrwashere joined #nim |
19:28:27 | ptdel | figured that might be the case |
19:28:51 | shashlick | holy build box offers a static build of openssl |
19:28:55 | ptdel | is nimcrypto what most people use? would be cool to have a standardized crypto lib honestly |
19:29:05 | shashlick | https://github.com/phusion/holy-build-box#included-static-libraries |
19:29:38 | ptdel | shashlick: this has to be built in this env unfortunately |
19:29:42 | * | narimiran joined #nim |
19:29:53 | ptdel | feels dirty statically linking in all this stuff but if it's the only way /shrug |
19:30:06 | dom96 | ptdel, what are you using nimcrypto for? |
19:30:16 | shashlick | what's restricting you from posting a self-sufficient binary? |
19:31:25 | ptdel | dom96: using it in conjunction with awslambda to run some serverless code in aws lambda that generates jwt's |
19:32:05 | ptdel | using nimcrypto for the token generation stuff |
19:32:27 | * | rnrwashere quit (Ping timeout: 252 seconds) |
19:32:27 | ptdel | mostly sha256 hashing |
19:32:55 | ptdel | shashlick: I'd have to run two versions of glibc locally to build it, thats not something i want to do |
19:33:10 | ptdel | i could use musl, but then i'd have to compile openssl with musl |
19:33:32 | * | rnrwashere joined #nim |
19:33:32 | dom96 | https://github.com/forlan-ua/nim-libsha/blob/master/libsha/sha256.nim |
19:33:37 | dom96 | Can't you simply use this? |
19:33:42 | dom96 | It seems to be a native implementation in Nim |
19:34:12 | ptdel | I could use a native implementation yeah |
19:34:15 | ptdel | but now I have to ask this: |
19:34:27 | ptdel | will there ever be a standardized native nim crypto package? |
19:34:30 | narimiran | hey ryukoposting, (when) can we expect a new video from you? :) |
19:34:40 | ptdel | the diaspora of crypto libs is unsettling lol |
19:35:42 | dom96 | That's a question I don't think anyone can answer |
19:35:44 | ryukoposting | narimiran I'm too busy lately to make a decent video |
19:36:21 | ryukoposting | like, I could make a video, but I wouldn't be able to make a good video. This summer I should be a lot more active :) |
19:36:26 | * | rnrwashere quit (Remote host closed the connection) |
19:37:12 | narimiran | i see |
19:37:28 | * | rnrwashere joined #nim |
19:38:29 | * | Jesin quit (Quit: Leaving) |
19:39:13 | ptdel | dom96 does nim have any sort of governance for that sort of thing? or some contributor forum for making those decisions |
19:40:46 | dom96 | we've got a forum https://forum.nim-lang.org/ |
19:41:15 | shashlick | holy build box doesn't bundle glibc into the binary |
19:41:37 | shashlick | it links with a 2011 glibc so the resulting binary works most places since they are on a newer glibc |
19:42:56 | ptdel | thats older than what i've got, maybe i'll have to try it |
19:43:37 | dom96 | in any case, from what I can tell sha256 seems fairly simple to implement so there shouldn't be much room for errors |
19:44:11 | dom96 | but then again, don't listen to me, I'm shit at crypto :) |
19:44:43 | ptdel | i'm totally fine using a native implementation, or writing my own. I just don't like the idea that there are many implementations of the same thing out there |
19:44:54 | ptdel | i consider it a detriment to the language, but i'm also overly particular |
19:44:58 | * | rnrwashere quit (Remote host closed the connection) |
19:45:14 | ptdel | many people working towards a common library would be ideal |
19:45:14 | * | rnrwashere joined #nim |
19:45:41 | dom96 | yeah, in an ideal world... |
19:45:53 | * | rnrwashere quit (Remote host closed the connection) |
19:46:05 | * | al_ quit (Quit: al_) |
19:46:30 | * | rnrwashere joined #nim |
19:46:45 | * | jjido_ joined #nim |
19:48:39 | * | jjido_ quit (Remote host closed the connection) |
19:51:27 | * | rnrwashere quit (Ping timeout: 268 seconds) |
19:52:52 | * | clyybber joined #nim |
20:00:24 | * | Jesin joined #nim |
20:09:05 | shashlick | check out nimssl which compiles in the SHA algorithms of openssl into your binary |
20:09:55 | * | rnrwashere joined #nim |
20:12:43 | shashlick | dom96 araq should we instead build nimble files into dlls and load them into nimble? i do this in my text editor with the plugins |
20:13:03 | shashlick | of course, same challenge as compiled exe version where nimscript isn't loadable |
20:13:11 | shashlick | since existing nimble files will be using nimscript calls |
20:14:13 | * | rnrwashere quit (Ping timeout: 250 seconds) |
20:14:33 | * | narimiran quit (Ping timeout: 255 seconds) |
20:16:12 | * | xylef quit (Quit: WeeChat 2.4) |
20:16:24 | ptdel | i was using nimssl before, I think i only switched to nimcrypto because they had an hmac implementation offhand |
20:26:18 | * | uvegbot joined #nim |
20:27:36 | * | zyklon quit (Ping timeout: 255 seconds) |
20:29:00 | shashlick | i can add more to it if you prefer |
20:31:03 | * | arecacea1 quit (Remote host closed the connection) |
20:31:22 | * | arecacea1 joined #nim |
20:32:18 | disruptek | jai apparently lets the code define how it should be built. perhaps a source of inspiration on what does or doesn't work... |
20:36:54 | dom96 | Jai hasn't been released yet |
20:37:49 | disruptek | no, but i'm sure that wouldn't stop information transfer. :-) |
20:38:28 | * | abm quit (Remote host closed the connection) |
20:38:53 | * | abm joined #nim |
20:43:05 | shashlick | how do I override echo? |
20:45:42 | * | al_ joined #nim |
20:46:06 | * | al_ quit (Client Quit) |
20:49:04 | * | krux02 quit (Remote host closed the connection) |
20:51:08 | dom96 | shashlick, check how it's implemented for NimVM |
20:51:43 | dom96 | actually you might be able to just do: `import system except echo` and then define your own |
20:52:45 | clyybber | Araq: Seems like using --newruntime, the compiler generates invalid C code for seq -> seq casts |
20:52:55 | clyybber | I reported it: https://github.com/nim-lang/Nim/issues/11018 |
20:53:05 | Araq | oh give me a break |
20:53:45 | Araq | can you fix it? |
20:53:52 | disruptek | lol |
20:57:11 | * | seni quit (Remote host closed the connection) |
20:57:29 | clyybber | Araq: I can try, but don't bet on it :) |
20:57:33 | * | seni joined #nim |
21:02:05 | Araq | it's easy, you need to cast the s.p field in ccgexprs.nim |
21:02:34 | clyybber | yeah the generated code is just missing a * |
21:05:16 | * | abeaumont quit (Remote host closed the connection) |
21:08:46 | * | ng0 quit (Remote host closed the connection) |
21:13:42 | * | ng0 joined #nim |
21:23:36 | dom96 | anyone want a fun project? |
21:24:01 | dom96 | write a getElementByCSSSelector function for htmlparser XmlNodes |
21:25:28 | shashlick | dom96: why are we splitting project name by spaces? https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L648 |
21:26:39 | dom96 | No idea |
21:26:42 | * | al_ joined #nim |
21:26:42 | * | al_ quit (Client Quit) |
21:26:44 | dom96 | I didn't write this |
21:26:50 | dom96 | But it obviously contains the arguments somehow |
21:28:01 | shashlick | well, setCommand only has one param |
21:28:06 | * | rnrwashere joined #nim |
21:28:08 | shashlick | two, the command and an option project |
21:28:17 | shashlick | is this Araq's code? |
21:30:47 | * | rnrwashere quit (Remote host closed the connection) |
21:31:21 | * | rnrwashere joined #nim |
21:31:55 | dom96 | Use git's blame to find out |
21:33:28 | shashlick | i want to be lazy man! |
21:35:07 | shashlick | sorry dom96, it's your code 😄 |
21:35:43 | shashlick | given its 4 years old, i'll not blame you, i don't remember last week |
21:36:41 | dom96 | lol |
21:37:43 | clyybber | Araq: So I do that in genSomeCast right? |
21:39:59 | * | solitudesf quit (Ping timeout: 246 seconds) |
21:45:07 | shashlick | escape() of newline becomes \x0A but unescape leaves it as is |
21:45:09 | ryukoposting | dom96 if you're around, I'd be curious to hear your thoughts on this https://github.com/nim-lang/packages/issues/1051#issuecomment-482651591 |
21:45:32 | ryukoposting | generally, what are some interesting/valuable things we can learn from other package managers? |
21:46:36 | * | rnrwashere quit (Remote host closed the connection) |
21:47:43 | * | rnrwashere joined #nim |
21:48:32 | dom96 | I think if we're going to go for semver that we should make it super formal ala Elixir (IIRC) |
21:48:52 | dom96 | where you actually have checks to make sure you don't violate semver (it detects API changes for example) |
21:48:55 | ryukoposting | doesn't have to necessarily be semver, I actually like Maven's snapshot thing |
21:50:17 | ryukoposting | I gotta get going right now but I really want to hear other people's experiences with different package managers, and what versioning systems might work best for nim/in general |
21:52:37 | * | rnrwashere quit (Remote host closed the connection) |
21:54:45 | * | rnrwashere joined #nim |
22:01:01 | shashlick | is it possible to import echo as something else? |
22:02:28 | shashlick | from system import echo as pecho doesn't work |
22:03:40 | shashlick | i want the system echo as well as my own overload but nim wants me to disambiguate each call which I can do in my code but not in the downstream nimble files |
22:04:02 | shashlick | and stdout.write doesn't work in nimscript |
22:04:22 | dom96 | can't you do what I suggested? |
22:04:35 | dom96 | and then inject a `proc echo`? |
22:11:40 | * | rnrwashere quit (Remote host closed the connection) |
22:17:36 | shashlick | ya but once I don't import it, how do i import it |
22:17:44 | shashlick | i cannot write to stdout any other way |
22:18:36 | shashlick | this is in nimscript |
22:18:49 | dom96 | hm |
22:19:02 | * | rnrwashere joined #nim |
22:19:12 | dom96 | at this point it might be time to hack the code in Nim's stdlib |
22:20:50 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:24:25 | * | abm quit (Remote host closed the connection) |
22:24:49 | * | abm joined #nim |
22:27:40 | * | rnrwashere quit (Remote host closed the connection) |
22:35:49 | shashlick | Hmm |
22:37:48 | clyybber | Araq: Well, I tried: https://github.com/nim-lang/Nim/pull/11019. It's probably bullcrap, as I had no clear idea if what I was doing is right... |
22:38:01 | clyybber | Anyways good night everyone |
22:38:17 | * | clyybber quit (Quit: WeeChat 2.4) |
22:45:57 | * | chickendan quit (Quit: Quit) |
22:57:26 | * | Summertime quit (Quit: Sunsetting.) |
22:58:07 | * | Summertime joined #nim |
22:59:34 | * | stefanos82 quit (Remote host closed the connection) |
23:03:00 | * | shomodj joined #nim |
23:05:35 | * | rnrwashere joined #nim |
23:09:45 | * | I_Right_I joined #nim |
23:10:32 | ryukoposting | man, did the germans go to sleep already |
23:12:42 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:13:22 | FromGitter | <deech> Araq: Why does the compiler explicity ban variants in a `const`? Also I was following with the code that checks this and came across https://github.com/nim-lang/Nim/blob/devel/compiler/types.nim#L1168, and was wondering what circumstances can you find an `nkRecCase` in an `skProc` or `skFunc`? |
23:22:28 | * | shomodj joined #nim |
23:26:08 | * | rnrwashere quit (Remote host closed the connection) |
23:26:57 | * | rnrwashere joined #nim |
23:30:20 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:44:01 | * | rnrwashere quit (Remote host closed the connection) |
23:47:40 | * | rnrwashere joined #nim |
23:58:14 | * | abm quit (Ping timeout: 246 seconds) |
23:59:06 | * | rnrwashere quit (Remote host closed the connection) |
23:59:43 | * | nsf quit (Quit: WeeChat 2.4) |