00:00:08 | * | Ckat quit (Read error: Connection reset by peer) |
00:00:24 | * | sagax quit (Remote host closed the connection) |
00:00:24 | * | Ckatt is now known as Ckat |
00:00:24 | * | tribly quit (Ping timeout: 265 seconds) |
00:00:24 | * | Hideki joined #nim |
00:00:48 | * | Hideki is now known as Guest82720 |
00:00:57 | * | dadada_ quit (Ping timeout: 272 seconds) |
00:02:08 | * | dadada_ joined #nim |
00:02:26 | * | kungtotte quit (Ping timeout: 240 seconds) |
00:03:23 | * | u0_a121 quit (Read error: Connection reset by peer) |
00:14:33 | * | kungtotte joined #nim |
00:15:51 | * | dadada_ quit (Ping timeout: 260 seconds) |
00:16:58 | * | dadada_ joined #nim |
00:21:04 | * | Guest82720 quit (Remote host closed the connection) |
00:22:51 | FromDiscord | <X.A.N.O.Z.O.I.D.> hello! 👋 |
00:25:36 | FromDiscord | <Recruit_main_70007> Hi |
00:26:12 | * | tribly joined #nim |
00:29:17 | * | u0_a121 joined #nim |
00:29:41 | * | kungtotte quit (Ping timeout: 268 seconds) |
00:30:38 | * | dadada_ quit (Ping timeout: 265 seconds) |
00:32:08 | * | dadada joined #nim |
00:32:31 | * | dadada is now known as Guest21970 |
00:46:24 | * | kungtotte joined #nim |
00:46:35 | * | Guest21970 quit (Ping timeout: 265 seconds) |
00:47:00 | * | dadada_ joined #nim |
00:47:56 | * | Pqzcih5 quit (Remote host closed the connection) |
00:49:05 | nullwarp | is there a nim library for resizing images? |
00:57:02 | * | Hideki_ joined #nim |
00:58:52 | Tanger | nullwarp, https://github.com/SolitudeSF/imageman has basic rezizing procs |
00:59:56 | Tanger | https://nimble.directory/search?query=image > Some other options in here, not sure which ones are maintained |
01:01:07 | * | dadada_ quit (Ping timeout: 272 seconds) |
01:02:00 | * | dadada_ joined #nim |
01:04:03 | * | opal quit (Ping timeout: 240 seconds) |
01:04:40 | * | opal joined #nim |
01:07:39 | * | u0_a121 quit (Read error: Connection reset by peer) |
01:13:12 | * | u0_a121 joined #nim |
01:15:56 | * | dadada_ quit (Ping timeout: 268 seconds) |
01:17:00 | * | dadada_ joined #nim |
01:30:53 | * | dadada_ quit (Ping timeout: 272 seconds) |
01:31:57 | * | dadada joined #nim |
01:32:20 | * | dadada is now known as Guest91703 |
01:35:38 | * | theelous3 quit (Ping timeout: 256 seconds) |
01:37:17 | * | ng0 joined #nim |
01:37:17 | * | ng0 quit (Changing host) |
01:37:17 | * | ng0 joined #nim |
01:39:21 | leorize | disruptek: it shouldn't move your cursor :/ |
01:39:28 | leorize | can you record it? |
01:39:43 | disruptek | i just did. |
01:40:15 | leorize | nice :) can I see? |
01:40:36 | * | ng0_ quit (Ping timeout: 268 seconds) |
01:41:06 | disruptek | sure, i'll hold my keyboard up to the monitor. make a sound like a goat when you're done looking. |
01:42:04 | * | theelous3 joined #nim |
01:45:06 | disruptek | what do you think? |
01:45:14 | * | Guest91703 quit (Ping timeout: 240 seconds) |
01:46:47 | disruptek | it's bad, right? |
01:47:07 | * | dadada_ joined #nim |
01:49:26 | disruptek | i'm sure this narimiran's fault. |
01:51:59 | * | u0_a121 quit (Read error: Connection reset by peer) |
01:53:14 | * | EvergreenTree quit (Ping timeout: 240 seconds) |
01:54:00 | FromDiscord | <treeform> @nullwrap I made flippy image library, it can resize images, i am here if you run into issues. Are the images you are resizing contain alpha? |
01:54:53 | FromDiscord | <treeform> https://github.com/treeform/flippy |
01:56:39 | leorize | disruptek: I'm having a hard time figuring out what you're trying to tell me :P |
01:57:14 | * | EvergreenTree joined #nim |
01:58:35 | disruptek | i think it's a binding issue but i dunno what's wrong with `nmap K :NimTypeOf<CR>` except that miran suggested it. and i don't trust that guy. |
02:00:26 | * | dadada_ quit (Ping timeout: 240 seconds) |
02:01:18 | FromGitter | <zetashift> Storm reaching germany too? |
02:02:03 | * | dadada_ joined #nim |
02:02:39 | * | Tanger quit (Remote host closed the connection) |
02:03:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
02:03:33 | * | Tanger joined #nim |
02:04:27 | FromGitter | <zetashift> Status.im is hiring by the way krux02, I wanted to apply for the Junior Remote position but I don't know that much C/C++ and I don't know much about the semantic pass in a compiler so hopefully I'll get better soon ;p |
02:15:47 | * | dadada_ quit (Ping timeout: 260 seconds) |
02:16:48 | * | dadada_ joined #nim |
02:23:27 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:25:37 | * | chemist69 joined #nim |
02:36:55 | * | arecaceae quit (Remote host closed the connection) |
02:37:50 | * | arecaceae joined #nim |
02:42:48 | FromGitter | <deech> Are there any packages that use the compiler as a library to do static analysis of types in Nim code? I see a couple of linters that fix naming and the like but none that invoke a typechecking pass. |
02:45:05 | disruptek | i don't know of anything like that. what are you trying to do? |
02:48:23 | FromGitter | <Varriount> Generally I just run `nim check` |
02:50:58 | FromGitter | <deech> As one small example I want a check that ensures that every generic function in a library is instantiated concretely at least once. |
02:54:33 | leorize | disruptek: I can't seem to reproduce the issue |
02:54:50 | disruptek | it's okay; thanks for looking. |
02:55:34 | nullwarp | @treeform thank you i'll check it out |
02:55:38 | * | dddddd quit (Ping timeout: 265 seconds) |
03:07:16 | * | dadada_ is now known as dadada |
03:11:45 | * | ng0_ joined #nim |
03:11:51 | * | ng0_ quit (Changing host) |
03:11:51 | * | ng0_ joined #nim |
03:12:16 | * | endragor joined #nim |
03:14:26 | * | ng0 quit (Ping timeout: 240 seconds) |
03:24:49 | * | u0_a121 joined #nim |
03:29:27 | * | muffindrake quit (Ping timeout: 240 seconds) |
03:31:54 | * | muffindrake joined #nim |
03:36:43 | disruptek | ryu doesn't work yet because it's full of (1 << n) - 1 bullshit that i now get to track down and fix. |
03:42:07 | * | theelous3 quit (Ping timeout: 260 seconds) |
03:45:10 | * | u0_a121 quit (Ping timeout: 268 seconds) |
03:45:21 | * | theelous3 joined #nim |
03:47:40 | FromDiscord | <Elegant Beef> ctrl + shift + h |
03:47:40 | FromDiscord | <Elegant Beef> `replace <<` |
03:47:41 | FromDiscord | <Elegant Beef> `with shl` |
03:47:41 | FromDiscord | <Elegant Beef> 😄 |
03:48:32 | disruptek | it's just rollover and stuff that offends me. |
03:57:23 | FromDiscord | <demotomohiro> I think `nimKeywordsLow` in compiler/wordrecg.nim sould be ord(wAddr) not ord(wAsm) because `addr`, `and`, and `as` are Nim keywords. |
03:59:25 | * | ng0 joined #nim |
04:00:24 | leorize | asm is a keyword |
04:02:26 | * | ng0_ quit (Ping timeout: 240 seconds) |
04:03:59 | FromDiscord | <demotomohiro> In `TSpecialWord` in compiler/wordrecg.nim, `wAsm` is defined after `wAs`. |
04:08:16 | leorize | to be fair, I'm not sure if nimKeywordsLow is even used |
04:08:42 | leorize | a quick referencing check with nimsuggest shows that nothing is using the constant |
04:10:14 | leorize | it might just be an artifact of the past when the compiler was written in pascal |
04:13:18 | leorize | ah, it's was a part of the detecting "shared keyword between Nim and C" |
04:13:33 | leorize | which is why it started from wAsm |
04:16:57 | FromDiscord | <Elegant Beef> Has anyone used the interfaced package? |
04:17:10 | FromDiscord | <Elegant Beef> I dont think i understand it well enough |
04:17:21 | leorize | those packages are not really popular among the community |
04:17:21 | FromDiscord | <Elegant Beef> Or it's borked, since it hasnt been changed for 2 years |
04:17:50 | FromDiscord | <Elegant Beef> Interesting |
04:17:59 | leorize | protocoled is much newer and it's author can be found on the forums |
04:18:20 | FromDiscord | <Elegant Beef> protocoled looks like it only supports 1 interface per object though |
04:18:31 | FromDiscord | <Elegant Beef> Atleast from my looking at it |
04:18:52 | FromDiscord | <Elegant Beef> Which clearly defeats the purpose of interfaces |
04:23:13 | leorize | multiple inheritance is not a thing in Nim, so that kind of interface can't be expressed with how the protocoled macro works |
04:24:46 | leorize | the interfaced macro might be the only way |
04:25:12 | leorize | but it's old and no one actually use it, so you gotta fix it up if you wanted to use it for your projects |
04:25:46 | FromDiscord | <Elegant Beef> Yea i guess i will have to |
04:31:34 | FromDiscord | <demotomohiro> @leorize, I'm trying to get a list of Nim keywords from a compiler module and using `nimKeywordsLow` and `nimKeywordsHigh` seems not a good idea. |
04:31:53 | leorize | low(TSpecialWords) + 1 |
04:33:01 | leorize | or you can just hardcode wAddr |
04:33:15 | FromDiscord | <demotomohiro> yeah, using it instead of nimKeywordsLow work |
04:33:17 | leorize | that list can't change since it's used throughout the compiler |
04:33:30 | leorize | so just hardcode whatever you want :) |
04:34:08 | * | lritter quit (Ping timeout: 246 seconds) |
04:35:00 | * | lritter joined #nim |
04:35:28 | FromDiscord | <demotomohiro> I think adding new Nim keyword would be breaking change. so that list will not change. |
04:36:32 | leorize | you will know it for sure if it ever changes :p |
04:42:06 | * | ng0_ joined #nim |
04:42:41 | * | nsf joined #nim |
04:45:35 | * | hax-scramper joined #nim |
04:45:36 | * | ng0 quit (Ping timeout: 268 seconds) |
04:49:33 | leorize | shashlick: possible flaw that you need to fix in your script: https://travis-ci.org/nim-lang/nimble/jobs/647156666#L208 |
05:13:02 | * | eremitah joined #nim |
05:15:03 | * | ltriant quit (Quit: leaving) |
05:22:59 | * | narimiran joined #nim |
05:37:57 | * | ng0 joined #nim |
05:39:24 | * | rockcavera quit (Remote host closed the connection) |
05:41:07 | * | ng0_ quit (Ping timeout: 260 seconds) |
05:42:26 | * | lritter quit (Ping timeout: 240 seconds) |
05:45:44 | * | marmotini_ joined #nim |
05:47:07 | * | lritter joined #nim |
05:49:02 | * | marmotini_ quit (Remote host closed the connection) |
05:49:52 | * | marmotini_ joined #nim |
05:53:21 | * | eremitah left #nim ("part") |
06:00:38 | * | Hideki_ joined #nim |
06:02:25 | leorize | Araq: is there any plans in the future to actually split system into smaller modules that have to be imported manually? |
06:02:57 | leorize | I could write a new io.nim, but since it's a part of system, I can't reuse the bits from the likes of posix.nim and winlean.nim |
06:05:23 | * | Hideki_ quit (Ping timeout: 260 seconds) |
06:07:17 | * | marmotini_ quit (Remote host closed the connection) |
06:24:54 | * | marmotini_ joined #nim |
06:29:41 | * | ng0_ joined #nim |
06:32:54 | * | ng0 quit (Ping timeout: 268 seconds) |
06:33:31 | * | theelous3 quit (Ping timeout: 268 seconds) |
06:41:44 | * | marmotini_ quit (Remote host closed the connection) |
06:45:00 | * | marmotin_ joined #nim |
06:45:51 | * | marmotin_ quit (Remote host closed the connection) |
06:48:18 | leorize | Araq: can you take a look at #13201? I've added -d:nimInheritHandles, a change log that'll need proofreading, and plugged one extra leak. |
06:48:19 | disbot | https://github.com/nim-lang/Nim/pull/13201 -- 3Make file descriptors from stdlib non-inheritable by default |
07:01:13 | * | ng0 joined #nim |
07:04:11 | * | ng0_ quit (Ping timeout: 260 seconds) |
07:04:36 | Araq | tests seem to be red? |
07:06:32 | * | marmotini_ joined #nim |
07:11:37 | * | marmotini_ quit (Ping timeout: 272 seconds) |
07:18:18 | FromDiscord | <Elegant Beef> Is there a way to see what's going on inside macros? |
07:18:32 | Yardanico | you mean show the resulting code of a macro? |
07:18:44 | FromDiscord | <Elegant Beef> I guess |
07:18:48 | FromDiscord | <Elegant Beef> Debug it somehow |
07:18:54 | Yardanico | well, there are different ways |
07:19:07 | Yardanico | treeRepr/lispRepr/astGenRepr |
07:19:17 | Yardanico | or just repr if you want to see resulting nim code |
07:20:28 | * | sagax joined #nim |
07:22:47 | FromDiscord | <Elegant Beef> Thanks |
07:23:20 | FromDiscord | <Elegant Beef> guess my issue is this `gensym393126:` |
07:23:40 | Yardanico | can you share your macro ? and pls don't paste the code directly in discord, use a paste service :P |
07:23:57 | FromDiscord | <Elegant Beef> Well im looking at the interfaced repo |
07:24:02 | FromDiscord | <Elegant Beef> trying to get it to work properly |
07:24:12 | FromDiscord | <Elegant Beef> the toInterface method it generates doesnt work |
07:24:51 | leorize | Araq: just fixed that |
07:25:35 | leorize | @Elegant Beef: the --expandMacro switch is also useful while developing macros |
07:25:46 | leorize | basically --expandMacro:macroName |
07:28:04 | FromDiscord | <Elegant Beef> `proc toCmd(this : ref)` |
07:28:04 | FromDiscord | <Elegant Beef> is basically the macro input |
07:28:14 | FromDiscord | <Elegant Beef> does the gensym make sense? |
07:30:02 | FromDiscord | <Elegant Beef> I say that but the error is `template/generic instantiation of toCmd from here` |
07:30:42 | FromDiscord | <Elegant Beef> *atleast i imagine that's the start of it* |
07:30:50 | FromDiscord | <Elegant Beef> Idk im a numpty |
07:31:10 | * | solitudesf joined #nim |
07:34:00 | FromDiscord | <Elegant Beef> Probably makes more sense for me to rewrite this just so i get a better grasp, probably dumb, but the way i see it go through all types check if they have the same proc signatures and if so create a toInterface method to said interface |
07:34:17 | FromDiscord | <Elegant Beef> Instead of relying on references |
07:34:42 | FromDiscord | <Elegant Beef> Instead of relying on generic conversion or from a ref or w/e |
07:35:21 | * | ftsf joined #nim |
07:35:27 | Yardanico | well, using generics or refs seems better than using methods :) |
07:35:51 | FromDiscord | <Elegant Beef> i mean toInterface proc |
07:36:03 | FromDiscord | <Elegant Beef> *C# use of the word method* |
07:37:13 | FromDiscord | <Elegant Beef> well i mean this adds a toInterface proc that casts the generic |
07:37:37 | FromDiscord | <Elegant Beef> And for some reason it doesnt have any of the properties it had |
07:37:38 | FromDiscord | <Elegant Beef> so idk |
07:37:55 | FromDiscord | <Elegant Beef> When i manually cast that is |
07:38:39 | leorize | https://forum.nim-lang.org/t/4571#28623 |
07:38:47 | leorize | @Elegant Beef ^ you might wanna see that |
07:40:10 | FromDiscord | <Elegant Beef> Thanks |
07:43:50 | * | chemist69 quit (Ping timeout: 246 seconds) |
07:44:15 | * | chemist69 joined #nim |
07:48:06 | FromDiscord | <Elegant Beef> So that worked perfectly |
07:48:31 | * | u0_a121 joined #nim |
07:48:33 | FromDiscord | <Elegant Beef> I didnt try it with nimble but annoyingly the repo lacks a .nimble |
07:51:26 | * | u0_a121 quit (Read error: Connection reset by peer) |
07:51:40 | Araq | I think this package needs to be updated for v1.0 |
07:54:27 | * | muffindrake quit (Ping timeout: 240 seconds) |
07:57:48 | * | muffindrake joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:47 | * | def- quit (Remote host closed the connection) |
08:04:29 | * | ng0 quit (Ping timeout: 265 seconds) |
08:04:53 | * | gmpreussner joined #nim |
08:05:20 | * | ng0 joined #nim |
08:06:04 | * | def- joined #nim |
08:08:43 | * | saby9996 joined #nim |
08:08:45 | * | filcuc joined #nim |
08:10:10 | * | filcuc quit (Client Quit) |
08:10:27 | * | filcuc joined #nim |
08:10:31 | * | saby9996 quit (Remote host closed the connection) |
08:15:12 | ftsf | https://play.nim-lang.org/#ix=2bhz hmm interesting bug I think? why does proc typeSizeFromID(id) raise an IndexError when it accesses the same const seq as the parent code which accesses it via the const directly works? |
08:17:16 | Araq | contrary to what most people think, accessing a .compileTime var at runtime makes more sense than your 'const' workaround |
08:17:26 | Araq | the const introduces a phase-ordering problem |
08:17:52 | Araq | I think both approaches are currently broken though |
08:18:20 | ftsf | mmm i'd prefer to access the compileTime variable, but it seems broken so i'm trying to work around it via the const method |
08:18:30 | * | dadada quit (Ping timeout: 265 seconds) |
08:19:31 | ftsf | ahh making typeSizeFromID a template works |
08:19:54 | * | dadada joined #nim |
08:19:59 | Araq | ah, possible yeah |
08:20:17 | ftsf | i'm not sure why the proc doesn't work though, but this should do me for now =) |
08:20:19 | * | dadada is now known as Guest83377 |
08:20:34 | FromDiscord | <Elegant Beef> now to bother you nice people more, how do you pass a table to a proc? |
08:21:05 | ftsf | proc foo(t: Table[X,Y]) = foo(myTable) |
08:21:47 | FromDiscord | <Elegant Beef> VScode autocomplete needs work |
08:22:05 | FromDiscord | <Elegant Beef> I tried T and table there was no table, only tables 😄 |
08:22:13 | FromDiscord | <Elegant Beef> I tried T and t there was no table, only tables 😄 |
08:23:47 | ftsf | Elegant Beef: https://play.nim-lang.org/#ix=2bhA |
08:24:03 | FromDiscord | <Elegant Beef> Yea i already got it |
08:30:10 | FromDiscord | <Elegant Beef> Well here is the super overkill thing i had running much more simplistically |
08:30:10 | FromDiscord | <Elegant Beef> https://hastebin.com/igafadojib.cs |
08:30:35 | FromDiscord | <Elegant Beef> But now i can easily add new commands so ya totally worth it i likd |
08:30:39 | FromDiscord | <Elegant Beef> But now i can easily add new commands so ya totally worth it i lied |
08:30:45 | FromDiscord | <Elegant Beef> Well here is the super overkill thing i had running much more simplistically |
08:30:45 | FromDiscord | <Elegant Beef> https://hastebin.com/igafadojib.py |
08:33:37 | ftsf | is it possible for a macro to resolve a generic argument? |
08:34:06 | Araq | dunno about "resovle" but it surely can "inspect" it. |
08:34:20 | Araq | Elegant Beef: omg adhere to our style guide |
08:34:30 | Araq | proc getCommandString etc |
08:34:38 | Araq | Nim is not C#. |
08:34:40 | ftsf | proc foo[T](bar: T) = myMacro(T) macro myMacro(t: typedesc) untyped = $t # outputs "T" |
08:35:12 | * | FromGitter quit (Remote host closed the connection) |
08:35:14 | ftsf | i'd like for the macro to get whatever T actualy is |
08:35:31 | * | FromGitter joined #nim |
08:38:38 | ftsf | https://play.nim-lang.org/#ix=2bhF it raises "no registered type T" |
08:40:06 | FromDiscord | <Elegant Beef> Every language i write i use the C# styling |
08:40:06 | FromDiscord | <Elegant Beef> 😄 |
08:43:24 | * | marmotini_ joined #nim |
08:45:34 | FromDiscord | <Elegant Beef> If i was releasing a library i'd certainly follow the styling |
08:45:40 | FromDiscord | <Elegant Beef> but for a oneoff thing screw it 😛 |
08:46:44 | * | floppydh joined #nim |
08:47:17 | FromDiscord | <Elegant Beef> I already cant use tabs so... you're lucky |
08:49:15 | * | u0_a121 joined #nim |
08:52:24 | * | Guest83377 is now known as dadada |
08:52:44 | dadada | has anyone here done work with C++ latest standard? |
08:52:49 | dadada | C++20? |
08:54:02 | * | hinst joined #nim |
08:58:45 | dadada | some of the things I read about "modern C++" seem enticing to me, but I don't really want to go back to C++, they have a track record of overcomplicating things... even the compile times alone speak against starting new projects with it... on the other hand there are many solid C/C++ libraries... hmm... hopefully nim's toolchain will get to the point where you can use C/C++ libs seemlessly, C++ will probably |
08:58:51 | dadada | stay around for a long time |
08:59:26 | dadada | seemlessly would mean that I could do something like |
08:59:43 | dadada | import cpp.Qt5Core |
09:00:07 | dadada | and nimble/nim figure out that Qt5Core must be a C++ library, (because of the cpp. prefix) |
09:00:25 | dadada | automatically run a tool like nimterop when it's fully developed |
09:00:59 | dadada | to create wrappers/bindings/(whatever you want to call it) without you even having to think about it |
09:01:57 | dadada | it should just be -> have the Qt5 headers/libs installed -> put import cpp.Qt5Core import cpp.Qt5Gui at the top of your source file |
09:02:33 | dadada | nim should then autoMAGICally create bindings wrappers (if they don't already exist) |
09:02:48 | * | Pqzcih5 joined #nim |
09:02:48 | dadada | once you start the normal compile or run cycle |
09:03:41 | dadada | this would be the dream workflow ... it would be even better if that was nim's general philosophy about including libs of external languages |
09:04:02 | dadada | want a python library? import python.numpy |
09:04:30 | dadada | want to use a java class/library? import java.org.foobar.bla.etc |
09:04:39 | FromDiscord | <Elegant Beef> Ok we're getting a little far |
09:04:59 | dadada | Elegant Beef: I realize this is wishful thinking at this point |
09:05:05 | FromDiscord | <Elegant Beef> I mean it's also weird |
09:05:20 | dadada | why is it weird? because it hasn't been done before? |
09:05:24 | FromDiscord | <Elegant Beef> CPP and C libraries is fine |
09:05:30 | FromDiscord | <Elegant Beef> but java and python, is ewwy |
09:05:47 | FromDiscord | <Elegant Beef> Like you have to run the jvm to use the java classes, atleast i'd assume |
09:06:16 | dadada | Elegant Beef: there are already projecs binding python to nim and nim to python ... obviously there's a selection of people with the need for such weird things |
09:06:48 | FromDiscord | <Elegant Beef> I think when you attempt to bind a pythong library it prints out a fly for you nearby insane asylum |
09:06:48 | dadada | Elegant Beef: you are right, the java one is even worse than the python one in my opinion ... |
09:06:49 | FromDiscord | <Elegant Beef> 😄 |
09:07:02 | FromDiscord | <Elegant Beef> python* |
09:07:14 | FromDiscord | <Elegant Beef> glyer* |
09:07:17 | FromDiscord | <Elegant Beef> flyer* |
09:07:20 | FromDiscord | <Elegant Beef> damn i good at typing right now |
09:07:23 | FromDiscord | <Elegant Beef> i am* |
09:07:28 | FromDiscord | <Elegant Beef> ok im just super daft atm |
09:07:54 | dadada | Elegant Beef: using python/java libs in nim wouldn't be ideal for sure, but sometimes there can be weird requirements for software that you can't get anywhere else, and then you do what? |
09:08:18 | FromDiscord | <Elegant Beef> Dont design software with weird requirements 😛 |
09:08:25 | FromGitter | <kdheepak> I'm reading some binary data in nim and I have the `169` in a uint seq. This corresponds to `'©'`. But nim's `chr(169)` does not work. Does anyone know how I should convert this correctly? |
09:08:27 | dadada | who says that I'm doing that |
09:09:00 | dadada | who says that I don't have some customer (or get thrust into a weird situation by some other way) where I have to glue things from different langs together? |
09:09:51 | FromGitter | <kdheepak> https://play.nim-lang.org/#ix=2bhN |
09:09:54 | dadada | Elegant Beef: my priority by far is C/C++ bindings ... I just brought up the python and java examples, because I think it should be a generalized way for making bindings to/from any language |
09:11:21 | dadada | Elegant Beef: there are many bindings to use C++ code from Java, so you can see a lot of people must have this need to bridge a VM with machine code libraries, of course this isn't something a purist would want to do, however life throws weird things at you |
09:11:52 | dadada | Elegant Beef: https://github.com/bytedeco/javacpp |
09:12:00 | dadada | 3k stars |
09:12:17 | FromDiscord | <Elegant Beef> Im not saying it's not wanted |
09:12:23 | FromDiscord | <Elegant Beef> just saying i view it super weird |
09:13:15 | dadada | Elegant Beef: maybe you can view it as less weird when you realize that it's just an arbitrary choice that java gets compiled to bytecode |
09:13:36 | dadada | there used to be a compiler (GCJ/or GJC?) that compiled it to machine code just like C/C++ |
09:14:21 | dadada | I find it disappointing that they have given up basically because OpenJDK appeared on the scene (java was released as FOSS) |
09:15:44 | dadada | there's nothing fundamentally wrong with the language except for the VM making it into a kind of a walled garden |
09:16:01 | FromDiscord | <Elegant Beef> I know it *Can* get combiled to machine code, but it's not, so to me stuff like that makes me think just make the app in the jvm and use shared memory for transfering thing |
09:16:02 | dadada | note I don't particularly love java (to put it mildly) |
09:16:44 | FromGitter | <kdheepak> ( I had to convert it to a rune first and then write out to the screen ) |
09:17:12 | dadada | Elegant Beef: I totally undestand your sentiment... didn't want to make this primarily about Java anyways |
09:17:39 | dadada | ie. there are a lot of pretty cool libraries for go, too, which gets compiled to machine code |
09:18:06 | dadada | maybe in a future far far away we could import something like that with simply |
09:18:13 | dadada | import go.foo.bar.library |
09:18:26 | * | hax-scramper quit (Ping timeout: 265 seconds) |
09:18:51 | * | hax-scramper joined #nim |
09:19:38 | * | filcuc quit (Ping timeout: 240 seconds) |
09:21:58 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:22:26 | * | hax-scramper joined #nim |
09:23:34 | * | Vladar joined #nim |
09:29:41 | * | u0_a121 quit (Read error: Connection reset by peer) |
09:34:58 | * | filcuc joined #nim |
09:36:57 | Araq | 169 does not correspond to `'©'`. |
09:37:21 | Araq | it depends on the codepage. it's an illformed utf-8 character, I think |
09:37:35 | Araq | try the encodings.nim stdlib module |
09:39:14 | * | filcuc quit (Ping timeout: 240 seconds) |
09:47:46 | * | solitudesf- joined #nim |
09:49:01 | * | solitudesf quit (Read error: Connection reset by peer) |
09:54:03 | Araq | https://github.com/nim-lang/RFCs/issues/191 this is great stuff |
09:54:05 | disbot | ➥ standardize all stringification API's around allocation-free binary $ operator + variadic strAppend ; snippet at 12https://play.nim-lang.org/#ix=2bif |
09:56:56 | dadada | Araq: I like having $ for turning anything into a string |
09:57:19 | dadada | I'm not sure I like ret$" bar " for appending stuff |
09:58:20 | dadada | I think I'd like this more: |
09:58:46 | Araq | read the proposal carefully |
09:58:52 | Araq | the unary $ will stay |
09:59:09 | dadada | yeah, I think I saw that |
09:59:42 | dadada | my issue is that the code (please don't stone me for this stupid comparison) all of a sudden starts to look like assembler |
10:00:15 | * | lqdev[m] joined #nim |
10:00:15 | lqdev[m] | I don't agree with this, `foo $ bar` looks nothing like assembler |
10:00:45 | dadada | I know that's not really a factual description, but it's very uncommon to have a variable$foo |
10:00:58 | lqdev[m] | it's probably a matter of spacing |
10:01:10 | dadada | being something that you'd expect to be more like variable $= foo |
10:01:18 | dadada | you have += for raising numbers |
10:01:22 | lqdev[m] | and don't say it's common to have variable & foo, either |
10:01:40 | dadada | lqdev[m]: true |
10:01:59 | Araq | bbl |
10:02:02 | lqdev[m] | but I kind of agree, $= would make more sense |
10:02:52 | dadada | what I like about the proposal is that foo =$ bar $morebar would work |
10:03:14 | dadada | I added the = because I think it wouldn't break with traditions as much |
10:03:57 | FromGitter | <Varriount> Could you do... |
10:04:23 | FromGitter | <Varriount> good =$ (bar, morebar) instead? |
10:04:42 | FromGitter | <Varriount> Although, at that point perhaps a function call is better |
10:04:47 | dadada | that would also be nice, why not have both |
10:05:04 | dadada | of course in the shell you can do echo $bla $foo $bar |
10:05:12 | dadada | so if you can do the same thing in nim |
10:05:19 | FromGitter | <Varriount> One other (nitpick) is that the `$` is generally hard to type. |
10:05:34 | dadada | nim all of a sudden becomes closer to a shell replacement + it looks cool in my humble opinion |
10:06:29 | dadada | Varriount: what keyboard do you have? I like typing $ on my German keyboard, never heard anybody complain about it for shell scripts or PHP |
10:07:38 | dadada | I want to clarify one things, I'm a fan of timotheecour's work |
10:07:45 | dadada | s/things/thing |
10:07:59 | FromDiscord | <Elegant Beef> ^ is probably the hardest symbol on a NA keyboard |
10:08:09 | WilhelmVonWeiner | shift+6? |
10:08:14 | FromDiscord | <Elegant Beef> yea |
10:08:21 | FromGitter | <Varriount> Araq: What ever happened to using term-rewriting macros for these things? |
10:08:23 | FromDiscord | <clyybber> huh, its shift + 4 here |
10:08:28 | FromDiscord | <clyybber> and I'm on a US layout |
10:08:39 | FromDiscord | <Elegant Beef> The exponent sign is shift + 6? |
10:08:44 | WilhelmVonWeiner | oh sorry my brain still saw NA and ignored it to go "GB" |
10:09:06 | FromDiscord | <clyybber> @Elegant Beef no the $, I thought your ^ was referring to above messages heh |
10:09:13 | FromDiscord | <Elegant Beef> Ah |
10:09:17 | FromDiscord | <Elegant Beef> my bad 😄 |
10:09:34 | FromDiscord | <clyybber> Varriount: disruptek had a brilliant idea |
10:09:41 | FromDiscord | <clyybber> I commented on the github issue |
10:09:55 | dadada | the only thing striking me as odd is that we can add something to a variable without =, you'd not expect ret+10 to increase ret by 10 |
10:10:13 | * | hax-scramper quit (Ping timeout: 272 seconds) |
10:10:18 | FromDiscord | <clyybber> if we extend term-rewriting macros to be able to use lastuse information then this is gonna solve itself |
10:10:20 | FromDiscord | <Elegant Beef> isnt there also |
10:10:20 | FromDiscord | <Elegant Beef> `inc` and `dec`? |
10:10:52 | FromDiscord | <clyybber> dadada: This is only about $ and strings |
10:10:54 | FromDiscord | <clyybber> the RFC |
10:10:58 | * | hax-scramper joined #nim |
10:13:35 | dadada | clyybber: I know Elegant Beef: yes, but those have the feel of a function, while $ has a different syntactical feel to it, I mean in the end they are all functions, but the expectations/consistencies are different |
10:14:19 | * | NimBot joined #nim |
10:16:48 | dadada | let's say I want to echo a string of ret and $x (x being a float) |
10:16:52 | dadada | so |
10:17:10 | dadada | echo ret $" " $x # with a space between them |
10:17:18 | dadada | if I understand the proposal right (which I might not!) |
10:17:31 | dadada | not only does the echo do what I'd like it to |
10:17:57 | dadada | ret also becomes what echo echoes, which might not be intended |
10:18:26 | FromDiscord | <clyybber> Disrupteks suggestion would be possible without any API changes |
10:18:27 | * | solitudesf- quit (Ping timeout: 272 seconds) |
10:22:30 | dadada | could you make the $ operater white space sensitive? what I mean is make foo $bar become "foostring barstring" and foo$bar become "foostringbarstring"? |
10:22:59 | dadada | just for the one case of their either being space between them or not, not for different space lengths |
10:24:34 | dadada | s/their/there |
10:24:57 | * | muffindrake quit (Ping timeout: 260 seconds) |
10:25:44 | FromGitter | <gogolxdong> Is there any capture library like libpcap? |
10:30:49 | dadada | I like https://github.com/nim-lang/RFCs/issues/190 |
10:30:51 | disbot | ➥ allow `when` in enum types ; snippet at 12https://play.nim-lang.org/#ix=2biz |
10:32:54 | * | u0_a121 joined #nim |
10:35:40 | * | marmotini_ quit (Remote host closed the connection) |
10:38:09 | * | marmotini_ joined #nim |
10:43:09 | * | u0_a121 quit (Read error: Connection reset by peer) |
10:45:06 | lqdev[m] | dadada: I don't think that's a good change, it would only bloat the language and make $ into a compiler magic |
10:49:44 | FromDiscord | <clyybber> yeah, I don't like it either |
10:50:45 | * | marmotini_ quit (Ping timeout: 272 seconds) |
10:50:45 | Araq | Varriount: TR macros will be re-worked, I found a better design for them |
10:51:07 | Araq | but TR macros cannot rewrite procs into "inplace" variants |
10:51:14 | FromDiscord | <clyybber> why? |
10:51:15 | Araq | if you don't offer the inplace variant. |
10:51:25 | FromDiscord | <clyybber> Ah, yeah sure |
10:51:26 | Araq | as I said, 'outplace' is 2-3 lines of code |
10:51:33 | Araq | 'inplace' is an open research problem. |
10:51:54 | FromDiscord | <clyybber> We can solve a part of the problem though |
10:51:55 | Araq | so the stdlib is heading to "outplace all the things" |
10:52:02 | * | hax-scramper quit (Ping timeout: 240 seconds) |
10:52:06 | FromDiscord | <clyybber> By transforming & into &= |
10:52:11 | FromGitter | <Varriount> Yeah, I realized that about a minute after I asked |
10:52:11 | Araq | which is fine with me, it suits Nim's "system programming" aspect |
10:52:35 | FromDiscord | <clyybber> Like `x = a & b` -> `x = (a &= b; a)` |
10:52:41 | FromDiscord | <clyybber> When a is a var and a last use |
10:53:14 | * | hax-scramper joined #nim |
10:53:15 | FromDiscord | <clyybber> And the assignment here would be sinked |
10:53:47 | FromDiscord | <clyybber> It doesn't solve all the issues, but it is a way of making `x = a & b & c & ...` efficient |
10:54:12 | FromDiscord | <clyybber> and it would be a rad way to show off nims powers |
10:54:20 | Araq | & is specialized already and also strformat is really good at it |
10:54:39 | Araq | anyhow, instead of a binary & |
10:54:47 | Araq | we can use 'toString' |
10:55:12 | Araq | proc toString(res: var string; x: CustomObject) |
10:55:25 | FromGitter | <Varriount> I guess the one issue I have with turning `$` into a binary operator is that such operators usually have an `=`, to denote that the left side is being modified |
10:55:26 | Araq | and then the single generic $ covers the convenience aspect |
10:55:35 | Araq | ah |
10:55:37 | Araq | lol |
10:55:42 | Araq | we already have &= |
10:55:54 | FromDiscord | <clyybber> yeah |
10:55:59 | Araq | we could use it :-) |
10:56:27 | FromDiscord | <clyybber> inplace procs can not be parallellized |
10:56:35 | FromDiscord | <clyybber> though thats probably a theoretical issue |
10:57:11 | FromGitter | <Varriount> Wait, so are we talking about &= doing implicit string conversation (or rather, writing)? |
10:57:43 | FromGitter | <Varriount> `stringVal &= objectVal`? |
10:58:06 | FromDiscord | <clyybber> &=$ lol |
10:58:08 | Araq | we're talking about how the unary $ is a bad building block |
10:58:26 | Araq | and figuring out simple and effective ways to deal with it |
11:01:33 | FromDiscord | <clyybber> If we have $= |
11:02:09 | FromDiscord | <clyybber> then we can automatically rewrite `a.add $b` to `a $= b` |
11:02:55 | FromGitter | <Varriount> clyyber: Sorta makes sense, though if you go with how other `=` operators work, that would be "set the left side the right side's stringified value" |
11:03:45 | Araq | ah yeah $= vs &= |
11:03:59 | Araq | I think we should use 'toString' |
11:04:00 | FromDiscord | <clyybber> &= is worse because it already exists and simply appends |
11:04:17 | Araq | actually &= is a more abstract sink operation |
11:04:24 | Araq | the idea is that you have |
11:04:29 | FromDiscord | <clyybber> $&= or &$= would be the most 'logical' but its also fing ugly |
11:04:30 | Araq | dest &= a |
11:04:32 | Araq | dest &= b |
11:04:33 | Araq | dest &= c |
11:04:51 | Araq | and you can switch between dest: string and dest: File easily |
11:05:01 | Araq | and dest: Socket |
11:05:06 | FromGitter | <Varriount> Araq: What about `writeString`? To signify that you are writing the string representation |
11:05:07 | Araq | but I gotta go, bye |
11:05:13 | FromDiscord | <clyybber> bb |
11:05:14 | FromGitter | <Varriount> Bye |
11:05:35 | dadada | bye |
11:05:44 | FromDiscord | <clyybber> toString gives me java ptsd |
11:08:23 | * | u0_a121 joined #nim |
11:08:23 | * | u0_a121 quit (Read error: Connection reset by peer) |
11:10:12 | FromGitter | <Varriount> clyybber: As much as I dislike Java, you can't say that the method's weren't descriptive. |
11:10:59 | FromDiscord | <clyybber> yeah |
11:11:34 | FromGitter | <Varriount> As opposed to C, where it seems like the creators are/were aiming to keep functions under 8 characters |
11:11:54 | FromDiscord | <clyybber> you gotta look at ats |
11:12:01 | FromGitter | <Varriount> ats? |
11:12:23 | FromDiscord | <clyybber> https://github.com/githwxi/ATS-Postiats |
11:16:37 | FromGitter | <Varriount> Hm, looks interesting |
11:16:56 | FromDiscord | <clyybber> loook at it: http://ats-lang.sourceforge.net/LIBRARY/prelude/SATS/DOCUGEN/HTML/integer.html |
11:18:57 | FromGitter | <Varriount> C |
11:20:22 | FromGitter | <Varriount> I take it that the language doesn't have overloading? |
11:21:46 | FromDiscord | <clyybber> it actually does |
11:22:01 | * | abm joined #nim |
11:26:28 | * | skrylar[m] joined #nim |
11:26:29 | skrylar[m] | ATS seemed kind of neat but also quite complicated when i noodled around with it |
11:27:53 | FromDiscord | <clyybber> yeah |
11:38:52 | dadada | any opinions on D here? |
11:48:08 | dadada | has anyone here done work with graalvm? |
11:48:16 | lqdev[m] | dadada: it looks like an ok language, if a bit bloated. |
11:49:23 | narimiran | Last call!! Nim Community Survey 2019 will close in about 18 hours (Feb 11th, 6am UTC), now is your last chance to participate: https://nim-lang.org/blog/2019/12/20/community-survey-2019.html |
11:52:52 | * | krux02 joined #nim |
11:56:58 | * | dddddd joined #nim |
12:01:22 | dadada | graalvm is almost revolutionary, it can glue together a huge number languages with native speed, if I'm not mistaken |
12:01:34 | * | Pqzcih5 quit (Remote host closed the connection) |
12:01:42 | dadada | it's language agnostic, I was oblivious to its details until today |
12:02:10 | FromGitter | <kristianmandrup> To test if a set has any elements, the only way I can see is using `mySet.len == 0` I think it would be nice to have a method `hasAny` for this typical case, as using `len` is too low level IMO |
12:02:11 | FromDiscord | <clyybber> not native speed |
12:02:14 | FromDiscord | <clyybber> but its pretty cool |
12:02:37 | * | marmotini_ joined #nim |
12:02:39 | dadada | clyybber, what does hinder it from native speed, the garbage collector? and? |
12:02:50 | FromDiscord | <clyybber> the fact that its a VM 🙂 |
12:03:43 | FromDiscord | <clyybber> the native AOT compilation also uses a simplified VM |
12:04:06 | dadada | yes, I understand that part |
12:04:32 | dadada | but once its AOT code and it runs, it still runs inside a VM, cause I thought it was basically just a garbage collector at this point |
12:04:37 | dadada | ? |
12:06:04 | FromDiscord | <clyybber> hmm, yeah. I think they are getting rid of VM like parts as much as possible |
12:06:32 | dadada | hmm... I'll definitely investigate this further |
12:06:44 | dadada | it can interact with llvm compiled c code |
12:06:56 | dadada | so wouldn't that mean Nim is covered? |
12:07:03 | FromDiscord | <clyybber> oh |
12:07:11 | FromDiscord | <clyybber> I havent tried it, but it would be great |
12:07:23 | dadada | https://www.graalvm.org/docs/getting-started/ |
12:07:32 | dadada | "GraalVM is a standalone Java Development Kit to execute Java or JVM-based languages (e.g. Scala, Kotlin), dynamic languages (e.g. JavaScript, R, Ruby, R, Python), LLVM-based languages (e.g. C and C++) in one shared runtime, and supports Linux, macOS and Windows platforms on x86 64-bit |
12:07:53 | dadada | " |
12:07:57 | * | fanta1 joined #nim |
12:10:35 | * | u0_a121 joined #nim |
12:11:02 | dadada | I like the direction this is going in, I always disliked the separate ecosystems of c/c++/java/python/ruby/kotlin/php/whatever, not that I have a problem with many ecosystem the issue I have is with their insular nature, if graalvm is further developed, and gets support for more and more languages/better tooling then maybe this will be a gripe I can put to rest finally |
12:11:12 | dadada | and I also always disliked the JVM a lot |
12:11:23 | dadada | now libreoffice should run without it |
12:12:30 | dadada | being thankful for something that came out of oracle is kinda weird, I guess they have some great FOSS minded devs though |
12:12:33 | FromDiscord | <clyybber> I should try compiling java to native |
12:12:41 | FromDiscord | <clyybber> s / java / minecraft |
12:13:18 | dadada | do so, I'd like to get your verdict on it |
12:14:01 | livcd | dadada: i dont think graalvm will be usable anytime soon for existing projects |
12:14:25 | dadada | livcd: what's the matter? |
12:14:26 | FromDiscord | <clyybber> dadada: Do you know truffle? |
12:14:33 | FromDiscord | <clyybber> truffle and graal together are pretty amazing |
12:15:32 | dadada | clyybber: read about it on wikipedia, and thought the same... it depends on the details of it, but I endorse all ideas of graalvm/truffle |
12:15:37 | dadada | that I know of so far |
12:15:38 | livcd | dadada: afaik graalvm does not work for java projects that heavily rely on reflection |
12:16:15 | * | theelous3 joined #nim |
12:17:19 | dadada | livcd: "Substrate VM has partial support for reflection and it needs to know ahead of time the reflectively accessed program elements." you're right |
12:17:23 | FromDiscord | <clyybber> dadada: The details are spot on. A naive lua implementation I made a year or so ago ran about twice to thrice as fast as lua |
12:17:49 | FromDiscord | <clyybber> luajit is still magnitudes faster, but luajit is built with black magic |
12:18:12 | dadada | clyybber, I think lua isn't known as particularly fast (might be mistaken), aside from that it's a really cool result |
12:18:45 | dadada | I see, well for a naive implementation, as you say, that's really exciting |
12:18:47 | FromDiscord | <clyybber> dadada: LuaJit is known as particularily fast |
12:18:49 | FromDiscord | <Rika> luajit is absolute black magic |
12:18:54 | FromDiscord | <Rika> the creator is a time traveler |
12:19:06 | FromDiscord | <clyybber> dadada: Its faster than v8 |
12:19:19 | FromDiscord | <clyybber> sadly it is in maintenance mode rn |
12:19:34 | dadada | clyybber, Rika, clyybber first referred to lua, not luajit |
12:20:08 | dadada | and good to know about the blackmagic luajit, thanks for filling me in |
12:21:16 | livcd | for other languages you have a big obstacle as well |
12:21:23 | livcd | eg. ruby |
12:21:45 | livcd | ideally you would take any C extension off the bat and it would automagically work |
12:22:26 | FromDiscord | <clyybber> I can only dream of luajit with https://github.com/LuaJIT/LuaJIT/issues/37 implemented |
12:22:27 | disbot | ➥ Add Hyperblock Scheduling |
12:23:53 | livcd | i think the biggest problem is that this is an Oracle project |
12:24:13 | dadada | it did came to my mind |
12:25:17 | livcd | but is actually luajit still faster than v8 ? |
12:26:17 | * | solitudesf joined #nim |
12:26:50 | dadada | " |
12:26:59 | dadada | "GraalVM provides a framework for creating language-agnostic tools like debuggers, profilers, or other instrumentations. In general, GraalVM provides a standardized way to express and run program code enabling cross-language research and the development of tools that are developed once and then can be applied to any language." |
12:27:34 | FromDiscord | <Rika> dadada, i never said anything about referencing your message |
12:28:33 | dadada | I like that mission statement, even if Oracle is pushing it (who I despise for obvious reasons), if they're serious about this, there must be some good folks inside Oracle that have pushed for graalvm... |
12:31:14 | FromDiscord | <clyybber> livcd: Yeah |
12:31:53 | livcd | clyybber: my google fu is failing me |
12:33:31 | * | Hideki_ joined #nim |
12:36:02 | * | hinst quit (Ping timeout: 240 seconds) |
12:36:53 | krux02 | dadada, I just started listening to the talk of graalvm and what problem it tries to solve. |
12:37:11 | FromDiscord | <clyybber> livcd: Try searching luajit vs v8 |
12:37:14 | dadada | krux02: link? |
12:37:31 | krux02 | here this slide: https://youtu.be/oWX2tpIO4Yc?t=345 |
12:37:49 | krux02 | "current situation" and "how it should be" comparison. |
12:38:00 | krux02 | That situation isn't true for Nim. |
12:38:04 | FromDiscord | <clyybber> @timotheecour Somehow your fix broke my code https://github.com/nim-lang/Nim/commit/79ec8c257183e01c01811a34e3930de7814756fb |
12:38:22 | krux02 | nor is the "How it should be" desireable for Nim. |
12:38:30 | krux02 | we don't want to prototype in Java |
12:38:42 | FromGitter | <Clyybber> @timotheecour Heres the issue: https://github.com/nim-lang/Nim/issues/13378 |
12:38:44 | disbot | ➥ Internal error in getTypeDescAux ; snippet at 12https://play.nim-lang.org/#ix=2bj0 |
12:38:56 | dadada | livcd: the enterprise edition claims to include "Improved performance and security over GraalVM Community" https://www.graalvm.org/docs/faq/ ... so yes, one has to be careful before committing to an Oracle stack |
12:39:00 | krux02 | Nim was compiled to C from the beginning |
12:39:15 | FromGitter | <Clyybber> Just goes to show that the bad magic that powers sigmatch shall never be touched or interacted with |
12:39:16 | FromGitter | <Clyybber> lol |
12:39:39 | krux02 | and it was designed to be fast from the beginng |
12:40:03 | krux02 | so we don't need to spend 100s of millions to get it fast as an afterthought (whitch doesn't work btw) |
12:40:22 | krux02 | one could argue that the nimvm is a bit slow |
12:42:25 | * | endragor quit (Remote host closed the connection) |
12:42:43 | dadada | krux02: for me the interesting thing about graalvm is 1) should I not be using nim for some reason and need java for some reason I may get better performance and there's no need for the JVM anymore 2) as nim is compiled to C, and graalvm can natively interact with that it makes an efficient glue between Nim code and Java/Kotlin/Scala/... possible, should I ever need a library from the java world, or vice versa |
12:42:49 | FromDiscord | <Rika> but nimvm isnt too critical is it? its mostly used at compiletime |
12:43:21 | dadada | krux02: the nim code itself would continue to use its own memory management and not be hampered by graalvm |
12:43:44 | * | lritter quit (Quit: Leaving) |
12:46:09 | krux02 | Well, personally I would throuw out the nim gc and replace it with a generic solution if I can, because developing a super awesome gc isn't the strength of nim. |
12:46:28 | krux02 | the strength is to have the right abstractions for a language. |
12:46:50 | krux02 | and what I've seen so far on the JVM is that all JVM languages basically have the same abstractions. |
12:46:54 | FromDiscord | <clyybber> thats what newruntime / gcarc is doing |
12:47:11 | krux02 | or they build on top of JVM abstractions. |
12:47:55 | krux02 | so java will always be the fastest language on the jvm and it is alwas a question of being not slower than java. |
12:48:06 | krux02 | But java doesn't allow value types |
12:48:13 | dadada | krux02: graalvm throws away the jvm, if I understand it correctly, you can't really call them jvm languages anymore once you migrate them to graalvm |
12:48:14 | krux02 | it doesn't allow arrays of structs |
12:48:37 | krux02 | well I didn't dig into the atoms of graalvm yet. |
12:48:43 | krux02 | I thik I will do it |
12:49:38 | krux02 | but my complaint here is, if you have a framework for developing new languges that provides you already with everything you need, then all the lanugages that you create tend to work the same, they just look a bit different. |
12:49:42 | dadada | "LLVM-based languages are fully supported via the LLVM bitcode execution environment." |
12:49:58 | krux02 | It is a bit like those unity games. They all are kind of similar |
12:50:04 | dadada | I get you! |
12:50:27 | dadada | but you can make the argument for the target architecture x86 as well, everything that targets x86 in the end will hit the same walls |
12:50:48 | * | hinst joined #nim |
12:50:49 | dadada | by that argument any sort of abstraction is bad, hopefully I've not oversimplified or misunderstood your argument |
12:51:23 | krux02 | yes |
12:51:39 | dadada | nim can't go beyong the limits of C because it compiles to it |
12:51:52 | dadada | C can't go beyond the limits of x86 machine code because it compiles to it |
12:52:17 | dadada | graalvm integrates seemlessly with llvm compiled (i.e. C) machine code |
12:52:37 | dadada | so there should really no be difference of performance when Nim is compiled for the graalvm runtime |
12:52:55 | dadada | at least not a huge one |
12:53:02 | FromDiscord | <clyybber> I wonder if I can build a program in graal and call it from the JVM |
12:53:25 | dadada | let me qualify this with: this is a conclusion with a lot of assumption and a limit amount of research |
12:53:28 | dadada | :D |
12:53:34 | dadada | assumptions |
12:54:16 | dadada | clyybber, call as in? |
12:55:12 | FromDiscord | <clyybber> call as in use |
12:55:24 | FromDiscord | <clyybber> for writing stuff in nim and calling it from java |
12:56:45 | dadada | depends on what you mean, for best performance you'd have to recompile the formerly JVM stuff for graalvm first, then it might work |
12:57:29 | dadada | you can even call nim code from java now, because there's JNI, you extern c from nim, and then you call from java with JNI |
12:57:44 | dadada | but that's a slower bridge |
12:58:00 | dadada | and as I understand it, with graalvm you get something better than JNI, with native speed |
12:58:32 | dadada | I must stop myself, I need to dig into this, before I sputter any half-truths ;D |
12:59:37 | FromDiscord | <clyybber> hmm, cool |
12:59:44 | dadada | finally, I agree with livcd, Oracle is the biggest downside I can see here |
12:59:55 | FromDiscord | <clyybber> I mean imagine making minecraft mods using nim, pure bliss of nostalgia and everything |
13:00:08 | dadada | :D |
13:00:31 | FromDiscord | <clyybber> Araq: ping |
13:05:06 | * | dddddd quit (Ping timeout: 268 seconds) |
13:06:15 | krux02 | dadada, sorry got a phone call |
13:06:44 | krux02 | regarding the target architecture x86 |
13:06:55 | * | abm quit (Ping timeout: 272 seconds) |
13:07:19 | krux02 | I don't think that this is a problem, since a programming language is executed most likely on x86, and if it isn't executed there, it is Arm |
13:07:49 | krux02 | I even think a language should be as close the the target platform as possible |
13:08:12 | krux02 | otherwise it isn't possible to use the target platform efficiently (see Jvm) |
13:08:53 | FromDiscord | <clyybber> krux02: You are probably a bit more well-versed with that part of the compiler, whats the essential difference between semTryExpr and semExpr? |
13:09:03 | krux02 | but for other platforms, such as GPUs or FPGAs new languages should exist. |
13:09:17 | krux02 | clyybber: I don't know |
13:09:46 | krux02 | probably semExpr is general, and semTryExpr is for nkTry |
13:10:43 | FromDiscord | <clyybber> alright, thanks. I'll dig into it then |
13:10:46 | federico3 | krux02: FPGAs are not computing platforms in themselves |
13:11:00 | krux02 | federico3, for me they are. |
13:11:13 | krux02 | they just work fundamentally different than CPUs |
13:11:57 | * | dddddd joined #nim |
13:12:38 | federico3 | ... |
13:13:25 | krux02 | federico3, why is an FPGA not a coputing platform for you? |
13:13:54 | krux02 | you can program an FPGA to becoma a CPU |
13:14:08 | krux02 | but you can also program a CPU to emulate another CPU |
13:15:47 | * | vesper11 quit (Ping timeout: 272 seconds) |
13:15:53 | * | vesper joined #nim |
13:17:52 | * | dddddd_ joined #nim |
13:18:17 | federico3 | or you can program many other logic blocks that do not implement a CPU |
13:19:33 | FromGitter | <alehander92> dadada i wanred to do something like this but not without |
13:19:37 | FromGitter | <alehander92> but not with nim* |
13:19:57 | FromGitter | <alehander92> krux02 i'd write my thing in nim dsl agreed |
13:20:15 | FromGitter | <alehander92> but i'd say such toolkits are good for prototyping |
13:20:27 | * | dddddd quit (Ping timeout: 240 seconds) |
13:20:30 | FromGitter | <alehander92> languages: stuff like semanthics, unusual features, type systems |
13:20:35 | * | dddddd_ is now known as dddddd |
13:20:37 | FromGitter | <alehander92> syntax experiments |
13:21:01 | * | Vladar quit (Quit: Leaving) |
13:21:46 | FromGitter | <alehander92> a motivation is that there is a lot of tooling stuff and architecture |
13:21:51 | FromGitter | <alehander92> that you dont need to reinvent |
13:21:57 | dadada | alehander92: I love good tooling |
13:22:01 | FromGitter | <alehander92> e.g. if you structure your lang/codebase |
13:22:07 | FromGitter | <alehander92> in the right way from the start |
13:22:47 | FromGitter | <alehander92> you can get stuff like incremental compilation, parallel compiling modules, repl hooks, lang server etc much more easily |
13:22:58 | * | muffindrake joined #nim |
13:23:06 | FromGitter | <alehander92> or even automatically (of course, * if you reuse a framework/lib) |
13:23:50 | FromGitter | <alehander92> of course, people think their language needs something very custom, but thats always possible |
13:24:05 | FromGitter | <alehander92> and usually its better to somehow reuse cool tooling across languages |
13:24:38 | * | hinst quit (Remote host closed the connection) |
13:24:49 | FromGitter | <alehander92> krux02 i dont agree with this argument |
13:25:20 | FromGitter | <alehander92> such a framework can give you some libs/dsl-s/conventions/"language" to make it more easier to write language passes |
13:25:23 | * | Hideki_ quit (Remote host closed the connection) |
13:25:47 | FromGitter | <alehander92> e.g. a type relation dsl, a convention that forces you to process your modules in a way that can be cached/parallelized |
13:25:52 | FromGitter | <alehander92> etc |
13:26:58 | * | hinst joined #nim |
13:30:22 | krux02 | alehander92, I think you can only get really good language interop, when you have a compatible types system. |
13:30:23 | * | u0_a121 quit (Read error: Connection reset by peer) |
13:30:36 | krux02 | I am still reading about graalvm |
13:30:48 | krux02 | but I wouldn't be surprised if they have such a thing. |
13:33:59 | * | rockcavera joined #nim |
13:40:43 | * | Kaivo joined #nim |
13:56:02 | * | Hideki_ joined #nim |
14:00:26 | * | Hideki_ quit (Ping timeout: 240 seconds) |
14:02:31 | * | u0_a121 joined #nim |
14:05:39 | FromGitter | <alehander92> i dont really focus on interop between languages built with the same toolkit |
14:05:44 | FromGitter | <alehander92> even the opposite |
14:06:15 | FromGitter | <alehander92> my idea would be to experiment with totally different systems/effects etc |
14:07:38 | * | marmotini_ quit (Ping timeout: 240 seconds) |
14:11:19 | * | Hideki_ joined #nim |
14:15:57 | * | dadada quit (Ping timeout: 272 seconds) |
14:16:54 | * | dadada joined #nim |
14:17:18 | * | dadada is now known as Guest6361 |
14:19:41 | FromGitter | <alehander92> i would make dsl-s to make it easier to codegen for existing backends |
14:20:16 | FromGitter | <alehander92> and one can make it easier to somehow map stuff from targets to source language concepts |
14:20:41 | FromGitter | <alehander92> (to put a ffi/importc mechanism on top) |
14:23:24 | * | marmotini_ joined #nim |
14:27:43 | * | fanta1 quit (Quit: fanta1) |
14:28:06 | * | Hideki_ quit (Remote host closed the connection) |
14:28:53 | * | Hideki_ joined #nim |
14:33:35 | * | Hideki_ quit (Ping timeout: 260 seconds) |
14:36:27 | * | u0_a121 quit (Read error: Connection reset by peer) |
14:41:33 | * | drewr quit (Ping timeout: 245 seconds) |
14:44:19 | Zevv | How do I format a time.Duration to MM:SS? |
14:44:33 | * | u0_a121 joined #nim |
14:45:15 | * | hax-scramper quit (Ping timeout: 260 seconds) |
14:46:57 | * | theelous3_ joined #nim |
14:54:32 | * | Guest6361 is now known as dadada |
14:55:01 | dadada | alehander92: 100% support making things easier, where do you think all of this will end though? |
14:55:41 | dadada | I think that IT-Adminstration being much of a challenge will be seen as a thing of the past in maybe 30-40 years |
14:56:13 | dadada | as well as many programming tasks that are still considered costly/time consuming today |
14:56:28 | FromGitter | <alehander92> dadada yeah |
14:56:47 | FromGitter | <alehander92> i think more people would have "average" programming skill |
14:56:51 | dadada | now you hear people claim that IT is a secure future, as opposed to manufacturing jobs, which is true for now! for now! |
14:56:55 | FromGitter | <alehander92> and the domain knowledge would start to matter more |
14:57:10 | dadada | ultimatively even for software there's a point where things get mostly good enough |
14:57:13 | dadada | and what then? |
14:57:30 | FromGitter | <alehander92> e.g. if so many people can program to a X level , its better to hire people with very good domain knowledge in your domain |
14:58:18 | dadada | on domains, for example auto insurance will largely go away, as self-driving mobility (cars/trains/buses) with sensors and compute power that will exist in 20 years |
14:58:24 | FromGitter | <alehander92> well, there will be still need of custom systems, more "low level"/"frameworks which all the other people use" experts |
14:58:32 | FromGitter | <alehander92> and legacy maintenance |
14:58:49 | FromGitter | <alehander92> yeah but e.g. about the justice stuff |
14:59:09 | FromGitter | <alehander92> many people think smart contract writing can replace many lawyers.. |
14:59:12 | dadada | will not cause 1/100th of the $ in accidents, so insurance will largely go away, so will many of the jobs |
14:59:21 | FromGitter | <alehander92> but you'll just get lawyers which can write code well |
14:59:23 | FromGitter | <alehander92> thats my point |
14:59:54 | dadada | hmm, I'll never higher a lawyer unless I'd have to |
15:00:07 | dadada | as will no one else |
15:00:10 | FromGitter | <alehander92> i would hope so, but do you think we will have actual self driving in 20 years |
15:00:16 | FromGitter | <alehander92> i think only on special roads |
15:00:34 | dadada | it's one of my main interests, and I can tell you with the sensor technology that's coming up now |
15:00:41 | FromGitter | <alehander92> dadada law is very similar to programming in a way imo |
15:00:58 | dadada | it will happen much much quicker, in 5 years we'll have really good self-driving, even if it's not allowed by regulation |
15:01:21 | FromGitter | <alehander92> you have a a hierarchy of rules and programs based on it |
15:01:29 | FromDiscord | <clyybber> alehander92: Depends on what country |
15:01:32 | FromGitter | <alehander92> dadada yeah but regulation is everything |
15:01:38 | FromDiscord | <clyybber> also law is interpreted |
15:01:43 | FromGitter | <alehander92> clyybber because of common law? |
15:02:02 | FromGitter | <alehander92> dadada and even 50x less deaths would still result in much more outrage imo |
15:02:14 | FromDiscord | <clyybber> alehander92: I mean like, its interpreted by a NFA |
15:02:16 | dadada | alehander92: not everything, it can even save money before it's legal, while the driver monitors the system, the system doesn't crash, thus lowering insurance costs |
15:02:50 | dadada | alehander92: there will be enough lobbyists (rightfully) explaining what statistics is |
15:03:24 | FromGitter | <alehander92> clyybber what is a NFA |
15:03:43 | FromGitter | <alehander92> dadada i really dont like this tesla idea of "monitoring" the vehicle |
15:03:53 | FromGitter | <alehander92> it flies in the face of how humans work and basic safety |
15:04:03 | FromDiscord | <clyybber> non deterministic finite automaton |
15:04:20 | FromGitter | <alehander92> if stuff doesnt depend on you, you are not so focused |
15:04:22 | FromDiscord | <clyybber> have good lawyers -> be allowed to do shit |
15:04:30 | FromGitter | <alehander92> and often 0.5 seconds are needed for a reaction |
15:04:48 | FromGitter | <alehander92> clyybber ahhh i wondered if its it |
15:05:02 | FromGitter | <alehander92> yeah but this is like a side effect |
15:05:16 | dadada | look how easy it has become for people to setup a website to day (ie. squarespace) in two decades the world will change to such a degree, that I don't think there'll be many safe jobs left, you'll have to constantly adapt, the time where you learned one thing and used that forever are just over |
15:05:21 | FromGitter | <alehander92> basically the point is that at least a subset of it like smart contract automatable stuff is common |
15:05:25 | FromGitter | <alehander92> and the way of thinking |
15:05:41 | * | drewr joined #nim |
15:05:45 | FromGitter | <alehander92> dadada yeah the automation scare |
15:05:48 | FromGitter | <alehander92> but think about it |
15:06:11 | FromGitter | <alehander92> when this happens, the tech itself would become so multi-layered and full of stuff |
15:06:19 | FromGitter | <alehander92> that you would have whole new "industries" |
15:06:20 | dadada | alehander92: the car should warn you before you need to react, also the statistics already look pretty good for Tesla with a nice trend, too |
15:06:23 | FromGitter | <alehander92> like e.g. the wordpress people |
15:06:40 | FromGitter | <alehander92> youtube tutorial people and all kinds of similar stuff |
15:07:05 | FromGitter | <alehander92> dadada ehh.. it just doesnt sound good for non-professional driver |
15:07:06 | dadada | yeah, but who pays money to read a blog, or to watch a tutorial? |
15:07:11 | FromGitter | <alehander92> people literally fall asleep |
15:07:14 | * | Hideki_ joined #nim |
15:07:14 | FromGitter | <alehander92> behind tesla-s |
15:07:19 | dadada | most people are freeloaders |
15:07:22 | FromGitter | <alehander92> its obvious this doesnt work well as a concept |
15:07:25 | dadada | when they can be |
15:07:59 | FromGitter | <alehander92> dadada well it sucks |
15:08:01 | dadada | alehander2: there's camera in the model three that should be able to detect people that fall asleep and then make the car stop, they need to implement it, but the hardware is there |
15:08:07 | FromGitter | <alehander92> to put everything behind a paywall |
15:08:24 | FromGitter | <alehander92> and the fact is that people get paid for this stuff |
15:08:41 | FromGitter | <alehander92> currently from clients/ads but even these days there are various models |
15:08:49 | FromDiscord | <clyybber> what would really be needed is some way that cars communicate with each other |
15:08:52 | dadada | I bet 99% of people on youtube don't make money from it (not more than cents |
15:08:53 | dadada | ) |
15:09:10 | dadada | and we can't all become YouTubers by any stretch of the imagination |
15:09:10 | dadada | :D |
15:09:12 | FromGitter | <alehander92> yeah, but the fact you already have like x% that do .. |
15:09:17 | FromGitter | <alehander92> is still interesting |
15:09:22 | FromGitter | <alehander92> not everyone would be that |
15:09:28 | FromGitter | <alehander92> but its just a silly example |
15:09:32 | dadada | clyybber: they're working on some standards for v2v communcation |
15:09:39 | FromDiscord | <clyybber> nice |
15:09:47 | FromGitter | <alehander92> you would maintain stuff for the configuration of local autofood drones |
15:10:00 | * | hax-scramper joined #nim |
15:10:08 | dadada | alehander92: in the beginning definitely |
15:10:14 | FromGitter | <alehander92> you would process data for machine datasets |
15:10:16 | FromGitter | <alehander92> and all kinds of stuff |
15:10:25 | * | theelous3_ quit (Ping timeout: 272 seconds) |
15:10:27 | FromGitter | <alehander92> clyybber i think this would work well on special roads indeed |
15:10:32 | dadada | okay, maybe we could do that |
15:10:36 | FromGitter | <alehander92> just that they shouldnt be mixed |
15:10:50 | FromGitter | <alehander92> and the week might get shorter |
15:10:51 | FromDiscord | <clyybber> otoh I could imagine some corp selling different safety-tiers, and depending on which you have you are more or less likely to be sacrificed during a crash |
15:10:52 | FromGitter | <alehander92> like 6 hours |
15:10:54 | * | theelous3 quit (Ping timeout: 268 seconds) |
15:11:09 | FromGitter | <alehander92> and more time for other stuff like teaching other skills etc which bceomes more popular |
15:11:20 | FromGitter | <alehander92> clyybber yeah the ethics aspects are still scary |
15:11:43 | disruptek | clyybber: it's more important to recognize that the optimization is one of many that are enabled by nim's cfg and arc. |
15:11:59 | FromDiscord | <clyybber> disruptek: Yeah |
15:12:04 | FromDiscord | <clyybber> also hi |
15:12:08 | disruptek | sup dawg |
15:12:21 | dadada | alehander92: https://www.youtube.com/watch?v=oK5_lRTUato I don't want to advertise for Tesla, but this is a nice video to see where their tech is at now, and they only use like 1/20th of the processing power of their ai accelerator, don't make full use of their input data yet, and the software isn't fully optimized either |
15:12:56 | FromDiscord | <clyybber> disruptek: U managed to get ryu a bit further? |
15:13:11 | narimiran | "in 5 years we'll have really good self-driving". yep, people said that back in 2015, too. |
15:13:13 | dadada | considering all of this, it's impressive, and the other big OEMs will either catch up, are close behind, or possibly even leading (waymo), also it's much better compared to 2-3 years ago |
15:13:29 | FromGitter | <alehander92> tesla's tech seems very good, i am just saying that i still think it would be best for everyone to have roads optimized for that (with enforced car communication like clyybber said) etc, it just requires general AGI for all roads |
15:13:34 | FromGitter | <alehander92> and this is impossible |
15:13:53 | dadada | worldwide standardized roads would be great, definitely |
15:13:54 | disruptek | i have to go through and fix all the hax that abuse bitops. |
15:14:12 | FromGitter | <alehander92> and we would have to fix bit stops on the roads |
15:14:26 | disruptek | even when they are supported by nim, it's the wrong semantics. |
15:14:36 | FromGitter | <alehander92> indeed, i would expect a start sign |
15:14:37 | FromDiscord | <clyybber> in which cases? |
15:14:57 | dadada | alehander92: my main point remains what do we (as a society) do when everything that used to be require a set of specialists, is either encoded in software or getting solved by highly complex specialist machines like 3d printers |
15:15:00 | disruptek | the way we decode float into mantissa/exponent. |
15:15:15 | dadada | alehander92: the assumption is that there'll always be enough industries to fill the voids |
15:15:56 | FromGitter | <alehander92> dadada yeah then you get more specialists for this stuff |
15:16:07 | dadada | alehander92: but I doubt that we can make an accurate prediction that there'll be the next upcoming industry... how many needs do human beings even have? |
15:16:11 | FromGitter | <alehander92> and the fact that you automate stuff .. just means that programmers start to matter LESS |
15:16:14 | FromDiscord | <clyybber> disruptek: I'm worried that if we make one mistake in translation, and fix it later, its gonna get worse and worse |
15:16:17 | FromGitter | <alehander92> and domain experts start to matter MORE |
15:16:19 | FromGitter | <alehander92> imho |
15:16:29 | disruptek | what? |
15:16:32 | FromGitter | <alehander92> because now its more important what to do |
15:16:33 | FromDiscord | <clyybber> disruptek: Or do you know exactly where the behaviour differs? |
15:16:58 | disruptek | the point is that i don't want to rely upon UB. |
15:17:10 | dadada | alehander92: how many domain experts does the world need? |
15:17:15 | FromDiscord | <clyybber> could you point me somewhere? |
15:17:17 | disruptek | we may overlook a case today, which is fine; it can be fixed tomorrow. |
15:17:28 | FromGitter | <alehander92> dadada well all of them? |
15:17:34 | FromGitter | <alehander92> the whole point of the automation is to make it easier |
15:17:44 | FromGitter | <alehander92> for other people to "configure" stuff to do what they need |
15:17:47 | disruptek | sure, lemme find where my code fucked off to. |
15:17:49 | FromGitter | <alehander92> and to have it |
15:18:00 | FromGitter | <alehander92> if the systems are good enough |
15:18:11 | FromGitter | <alehander92> you only need to provide the actual rules or good data |
15:18:22 | FromGitter | <alehander92> and both of them are more a domain-related thing |
15:18:56 | FromDiscord | <clyybber> while I like automation, I don't like complicated stuff being automated with even more complex stuff |
15:19:12 | disruptek | clyybber: do a pull and then see f2s.nim block at 450. |
15:19:18 | FromDiscord | <clyybber> aight |
15:19:34 | disruptek | we're just making a mask, but it relies upon rollover. |
15:20:17 | disruptek | even the debug stuff above should be rewritten. but whatever. |
15:20:34 | disruptek | i mean, we want this c code to be rewritten in nim. it has to be done. |
15:21:01 | disruptek | it'll be fine. just not something i wanted to jump into at 11p. 😉 |
15:21:05 | FromDiscord | <clyybber> how is it UB tho? |
15:21:38 | FromGitter | <alehander92> disruptek |
15:21:40 | FromGitter | <alehander92> what debug stuff |
15:21:57 | disruptek | some stuff in this ryu port. |
15:22:03 | disruptek | !repo disruptek/ryu |
15:22:04 | disbot | https://github.com/disruptek/ryu -- 9ryu: 11ryu for nim 15 4⭐ 0🍴 |
15:22:34 | disruptek | you want to rely upon rollover when you don't have to? |
15:23:23 | disruptek | i just want to have a mask and say, "here, what matches?" |
15:23:58 | FromDiscord | <clyybber> wdym with rollover? |
15:24:03 | disruptek | overflow |
15:24:12 | FromDiscord | <clyybber> in the addition? |
15:24:21 | * | Hideki_ quit (Ping timeout: 272 seconds) |
15:24:46 | FromDiscord | <clyybber> there: `ryuFloatMantissaBits + ryuFloatExponentBits` ? |
15:25:22 | disruptek | we make a mask by shifting a 1 past the "edge" of the variable and then subtracting 1, which yields 0b11111111111... to the size of the integer. |
15:26:22 | FromDiscord | <Rika> ryu is the floating point printer right? |
15:26:31 | FromDiscord | <clyybber> yeah |
15:26:32 | FromDiscord | <Rika> amazing |
15:26:33 | disruptek | i believe differing behavior there is giving us overlarge exponents. |
15:26:58 | FromDiscord | <clyybber> huh |
15:27:10 | FromDiscord | <clyybber> we should see what C code it generates |
15:27:11 | disruptek | it's basically a hack, imo. as trivial as it is. and one i've done many, many, many times in my c career. but this isn't c. |
15:27:50 | disruptek | it generates x & ((1 << 23) - 1) or whatever. |
15:28:08 | disruptek | it generates x & (0b10000000000000000 - 1) or whatever. |
15:28:18 | disruptek | it generates x & 0b111111111111 or whatever. |
15:28:24 | disruptek | you see? |
15:29:28 | FromDiscord | <clyybber> ah |
15:30:36 | disruptek | just like krux was saying, i chose nim for its abstractions. |
15:30:54 | disruptek | sure, i want the underlying binary compat, but i'm here for the abstraction. |
15:31:25 | FromDiscord | <clyybber> yeah, I'm just wondering how there can be a difference |
15:31:42 | disruptek | i never want to learn the answer to that question. |
15:31:48 | FromDiscord | <clyybber> is ryuFloatMantissaBits and the like a int in ryu too? |
15:31:58 | FromDiscord | <clyybber> or is it a uint there? |
15:32:14 | disruptek | it's an int literal. |
15:32:45 | * | nsf quit (Quit: WeeChat 2.7) |
15:32:50 | FromDiscord | <clyybber> ah, so maybe its all fixed when we make it an uint |
15:33:29 | FromDiscord | <clyybber> I feel like we should first make it work and then make it beautiful and make it take advantage of nim |
15:33:35 | disruptek | no, that doesn't matter. it's just an arg to shift. |
15:33:54 | FromDiscord | <clyybber> oh, yeah |
15:34:56 | disruptek | it should work today. the 128bit stuff might take a little longer. i looked at it and it should work for us, but i'm not 100%. |
15:35:10 | FromGitter | <alehander92> so are we doing the podcast thing |
15:36:46 | FromDiscord | <clyybber> disruptek: Nice, though I have to confess that I don't get where 128bit is needed |
15:37:07 | FromDiscord | <clyybber> looking at ryu I can only see that its needed for 128bit float to string |
15:37:17 | FromDiscord | <clyybber> aaaah |
15:37:20 | FromDiscord | <clyybber> umul |
15:37:21 | FromDiscord | <clyybber> there it is |
15:39:53 | * | ftsf quit (Ping timeout: 268 seconds) |
15:47:07 | * | Zectbumo quit (Remote host closed the connection) |
15:52:27 | * | u0_a121 quit (Read error: Connection reset by peer) |
16:04:43 | * | ptdel joined #nim |
16:04:44 | * | u0_a121 joined #nim |
16:06:07 | * | fanta1 joined #nim |
16:15:00 | disruptek | i see the future. |
16:15:31 | * | tane joined #nim |
16:15:48 | FromDiscord | <clyybber> oh you do? |
16:15:52 | FromDiscord | <clyybber> show me |
16:16:21 | disruptek | i the future, not the past. |
16:16:27 | disruptek | ^ see |
16:16:28 | FromGitter | <kristianmandrup> Hey @alehander92 :) What podcast? |
16:18:58 | disruptek | i just see it like i'm looking at a photograph. |
16:19:04 | * | luis_ joined #nim |
16:20:09 | FromDiscord | <clyybber> I hoped you saw it like you are looking at a passing test of ryu |
16:20:42 | FromGitter | <alehander92> @kristianmandrup hey |
16:21:19 | FromGitter | <alehander92> irc |
16:21:21 | * | Vladar joined #nim |
16:21:29 | FromGitter | <alehander92> and discord and gitter are bridged together here |
16:21:35 | disruptek | kinky |
16:22:17 | FromGitter | <alehander92> so yeah i still dont think you need to generate types for the javascript backend |
16:22:47 | FromGitter | <alehander92> but this is very subjective so i hope other people comment on the issue? |
16:23:13 | FromGitter | <alehander92> otherwise the podcast idea is to just make a #nim (or just language) podcast eventually |
16:23:30 | FromGitter | <alehander92> but its totally unprofressinal just-an-idea |
16:25:05 | * | tane quit (Quit: Leaving) |
16:32:02 | * | hax-scramper quit (Ping timeout: 240 seconds) |
16:32:41 | * | chemist69 quit (Ping timeout: 246 seconds) |
16:33:58 | * | chemist69 joined #nim |
16:34:05 | * | muffindrake quit (Ping timeout: 246 seconds) |
16:35:09 | FromGitter | <alehander92> disruptek is this |
16:35:12 | FromGitter | <alehander92> nickelbad |
16:35:16 | FromGitter | <alehander92> nickelback* |
16:35:25 | FromGitter | <alehander92> genuinely like them i just ok. |
16:35:46 | * | muffindrake joined #nim |
16:35:51 | FromGitter | <deech> Asked last night but, are there any examples that use the compiler as a library that do static analysis on Nim code after typechecking not just on the AST. |
16:36:26 | disruptek | alehander: nah, it's suntree. |
16:36:41 | FromGitter | <kristianmandrup> Podcast anyone? |
16:36:45 | leorize | @deech: probably not |
16:36:47 | disruptek | deech: i would just write a useful test suite. |
16:37:31 | FromGitter | <deech> leorize, don't mind being the first do you see any reason it couldn't be done with the compiler API? |
16:38:10 | leorize | I'm not the best person to ask about this :p |
16:39:50 | FromGitter | <kristianmandrup> @alehander92 How do I define a HashMap (table?) in a type def? ie. I'd like a collection `outputFiles` as a map of `TFile` keyed by name |
16:40:15 | FromGitter | <kristianmandrup> `ref Table[A, B]` ?? |
16:40:24 | disruptek | TableRef[A, B] |
16:40:33 | FromGitter | <kristianmandrup> oh :O |
16:41:09 | FromGitter | <Clyybber> @timotheecour ping |
16:42:02 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e4187da1d23aa47aa06b244] |
16:42:58 | FromGitter | <kristianmandrup> Anyone knows where in the Nim code base, the actual output file write to disk takes place? |
16:43:22 | leorize | depends on the backend |
16:43:43 | FromGitter | <kristianmandrup> Found this for `jsgen` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e41883f45000661fcb101ba] |
16:44:08 | FromGitter | <kristianmandrup> Does that look right? - Still not sure what the `Rope` thing means though |
16:44:47 | leorize | rope is a kind of string that can be concatenated with efficiency of O(1) |
16:45:51 | FromGitter | <kristianmandrup> okay, clever :) rope is a better string |
16:46:07 | leorize | for use case of the compiler, yes :) |
16:46:13 | disruptek | just different and use-cases are kinda esoteric. |
16:46:18 | FromGitter | <kristianmandrup> Does `wholeCode` then generate the full source code to be written to file? |
16:46:34 | disruptek | most people who think they need ropes are wrong. |
16:46:55 | FromGitter | <kristianmandrup> rope to hang yourself, string to tie your shoe :P |
16:47:14 | disruptek | yep. |
16:47:33 | leorize | disruptek: how's your ryu port going? |
16:47:50 | disruptek | ima work on it once these edibles kick in. |
16:51:39 | FromDiscord | <clyybber> call me crazy, but I don't exactly love it when the compiler spews those link messages out by default |
16:51:44 | FromDiscord | <clyybber> they get pretty big |
16:54:19 | * | floppydh quit (Quit: WeeChat 2.7) |
16:54:37 | disruptek | ~motd is if you make $50/hr and work a 40hr week, you cost (someone) $2,000. For the same amount of money, you can run 238 servers at $0.05/hr, 24/7. Can you create more value than that for $2,000/wk? |
16:54:37 | disbot | motd: 11if you make $50/hr and work a 40hr week, you cost (someone) $2,000. For the same amount of money, you can run 238 servers at $0.05/hr, 24/7. Can you create more value than that for $2,000/wk? |
16:55:02 | * | marmotini_ quit (Remote host closed the connection) |
16:55:37 | * | marmotini_ joined #nim |
16:56:04 | jken | disruptek, would that not be comparing apples to oranges? People can't speak TCP, servers can't write and debug code. |
16:56:18 | FromGitter | <kristianmandrup> What does this do? |
16:56:25 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e418b38ecfa4461c050523a] |
16:56:29 | disruptek | the point is, we've long since passed the point where computers are cheap enough. |
16:56:35 | FromGitter | <kristianmandrup> Where |
16:56:38 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e418b46c900d747abf7a714] |
16:56:42 | disruptek | all we have left are problems we can't figure out how to ask a computer. |
16:56:50 | disruptek | or a cloud of computers. |
16:58:01 | disruptek | maybe it's time to stop saying that an algorithm is impossible because we cannot enumerate all the solutions. |
16:58:23 | * | Trustable joined #nim |
16:58:35 | leorize | @kristianmandrup see ModuleGraph definition |
16:58:52 | FromGitter | <kristianmandrup> what does `PGlobals(graph.backend)` do? I've not seen this syntax before. Dynamic lookup in object? |
16:59:06 | leorize | it's just conversion |
16:59:21 | leorize | graph.backend is a RootRef, used to store backend-specific data |
16:59:33 | FromGitter | <kristianmandrup> ` ModuleGraph* = ref object` |
16:59:35 | leorize | PGlobals is what stored by the jsgen |
17:00:44 | FromGitter | <kristianmandrup> I see, basic type conversion, down casting |
17:01:28 | FromGitter | <kristianmandrup> Collected ropes (by compiler) to be output in a given order ⏎ ⏎ ```PGlobals = ref object of RootObj ⏎ typeInfo, constants, code: Rope``` [https://gitter.im/nim-lang/Nim?at=5e418c6845000661fcb11124] |
17:01:53 | FromGitter | <kristianmandrup> So I assume |
17:02:34 | FromGitter | <kristianmandrup> ```template line(p: PProc, added: string) = ⏎ p.body.add(indentLine(p, rope(added)))``` ⏎ ⏎ Makes each entry added to `body` available to the globals `code` somehow!? [https://gitter.im/nim-lang/Nim?at=5e418caa340a8019bbb38caf] |
17:03:29 | FromGitter | <kristianmandrup> Aha |
17:03:32 | FromGitter | <kristianmandrup> ```proc attachProc(p: PProc; content: Rope; s: PSym) = ⏎ p.g.code.add(content)``` [https://gitter.im/nim-lang/Nim?at=5e418ce4df1153705e283396] |
17:05:00 | FromGitter | <kristianmandrup> ``` genModule(p, n) ⏎ p.g.code.add(p.locals) ⏎ p.g.code.add(p.body)``` [https://gitter.im/nim-lang/Nim?at=5e418d3c19597421f3be7a50] |
17:05:41 | FromGitter | <kristianmandrup> Starting to make a tiny bit of sense... wish there was some kind of docs or high level architecture map ;) |
17:06:47 | FromGitter | <deech> Need a `libclang` for Nim. :) |
17:12:03 | * | marmotini_ quit (Remote host closed the connection) |
17:13:26 | * | hax-scramper joined #nim |
17:19:12 | FromGitter | <kristianmandrup> Anyone knows where the `nim` binary parses the CLI options and `nim.cfg` options etc? |
17:19:38 | Araq | cmdlinehelper.nim |
17:20:19 | disruptek | we really have to do something about gitter pastes. |
17:20:39 | disruptek | i guess i will make the bot do that. |
17:22:35 | FromGitter | <kristianmandrup> ah, I found `proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =` in `nim.nim` |
17:25:57 | * | hax-scramper quit (Ping timeout: 272 seconds) |
17:26:11 | * | hax-scramper joined #nim |
17:27:21 | FromGitter | <Varriount> @kristianmandrup It's the once with the giant huge case statement, right? |
17:32:22 | FromDiscord | <clyybber> Araq: Hey, I assigned showstopper to a bug I am hitting, since I cant work around it |
17:32:39 | FromDiscord | <clyybber> I just locally reverted the offending commit |
17:32:58 | * | luis_ quit (Quit: luis_) |
17:33:24 | * | luis_ joined #nim |
17:33:32 | FromDiscord | <clyybber> This one: https://github.com/nim-lang/Nim/issues/13378 |
17:33:33 | disbot | ➥ Internal error in getTypeDescAux ; snippet at 12https://play.nim-lang.org/#ix=2bj0 |
17:33:36 | FromDiscord | <clyybber> its pretty weird |
17:33:46 | FromDiscord | <clyybber> or at least I don't entirely understand it |
17:33:56 | FromDiscord | <clyybber> but I also don't understand timotheecours fix |
17:36:03 | * | u0_a121 quit (Read error: Connection reset by peer) |
17:38:52 | FromGitter | <kristianmandrup> @Varriount Yeah, the Nim compiler code is kinda "scary" |
17:39:19 | * | nsf joined #nim |
17:39:19 | Araq | Clyybber: reorder RenderTask and Resource |
17:41:11 | Araq | kristianmandrup: compiler/cmdlinehelper.nim |
17:41:37 | Araq | and also https://nim-lang.org/docs/intern.html for some documentation |
17:41:39 | FromDiscord | <clyybber> Araq: Doesn't help it |
17:44:12 | FromGitter | <alehander92> @deech do you want to reuse the typechecker from nim? |
17:46:45 | * | marmotini_ joined #nim |
17:48:02 | * | marmotini_ quit (Remote host closed the connection) |
17:48:44 | * | marmotini_ joined #nim |
17:50:48 | FromGitter | <deech> yes |
17:55:00 | FromGitter | <Varriount> @kristianmandrup I don't recommend looking at the lambda lifting code. Unearthly terrors from beyond mortal planes live there. |
17:56:16 | FromGitter | <alehander92> @deech in what way? do you want to use them for tooling |
17:56:31 | FromGitter | <alehander92> as i guess the langserver/similar tools should already do it |
17:56:44 | FromDiscord | <clyybber> Varriount: Eh, lamdalifting seems sane to me |
17:56:49 | FromDiscord | <clyybber> Its necessary complexity |
17:56:58 | FromDiscord | <clyybber> sigmatch and semexpr are the bad parts |
17:57:02 | FromGitter | <alehander92> its like weightlifting |
17:57:04 | FromGitter | <alehander92> for compilers |
17:57:18 | FromGitter | <alehander92> it probably needs a bit of nice comment overview? |
17:57:24 | * | u0_a121 joined #nim |
17:57:40 | FromGitter | <alehander92> a bit more* |
17:59:03 | FromGitter | <deech> @alehander92 As one small use case I'd like a write a linter that flags generic procs exposed by the package that don't have any concrete instantiations either in the package or in the tests. |
18:00:16 | FromGitter | <deech> Another is auto-wrapping a Nim library so exposed functions and types are exported to C. |
18:14:45 | FromGitter | <kristianmandrup> What is the Nim equivalent of `slice`? ie. cut off string at some position? Ah yeah, just a simple range if I recall ;) |
18:16:47 | FromGitter | <kaushalmodi> That "range" is actually returning a Nim Slice: https://nim-lang.github.io/Nim/system.html#Slice |
18:18:14 | * | Vladar quit (Quit: Leaving) |
18:20:25 | * | u0_a121 quit (Read error: Connection reset by peer) |
18:20:31 | FromGitter | <kristianmandrup> What is the range syntax for `slice(5)` meaning from index 5 to the end? |
18:21:11 | leorize | [5..^1] |
18:24:15 | FromGitter | <kaushalmodi> @kristianmandrup Also check this out: https://scripter.co/notes/string-fns-nim-vs-python/#string-slicing :) |
18:30:36 | * | blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in) |
18:30:36 | * | hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in) |
18:32:42 | FromGitter | <kristianmandrup> @kaushalmodi Thanks |
18:32:53 | FromGitter | <kristianmandrup> Btw, how do I convert string into `Rope`? |
18:33:47 | FromGitter | <kristianmandrup> Ah, just use `add` |
18:34:46 | * | leorize quit (Quit: WeeChat 2.6) |
18:35:24 | * | leorize joined #nim |
18:37:31 | * | u0_a121 joined #nim |
18:37:31 | * | u0_a121 quit (Read error: Connection reset by peer) |
18:40:32 | FromGitter | <kristianmandrup> How to create `RelativeFile` from a `filePath` string? |
18:41:55 | FromGitter | <kristianmandrup> How to iterate a `TableRef`? |
18:42:20 | Araq | like you do over everything else |
18:42:53 | FromGitter | <kristianmandrup> `for pairs in zip(names, years):` but how do I get the keys and values? |
18:43:03 | Araq | zip? |
18:43:14 | FromGitter | <alehander92> no, you have to learn about `pairs()` vs `items()` |
18:44:40 | narimiran | @kristianmandrup: take a look at this section of tables' documentation: https://nim-lang.github.io/Nim/tables.html#15 |
18:45:27 | FromGitter | <kristianmandrup> I got it `for filePath, file in m.outputFiles` |
18:46:10 | FromGitter | <kristianmandrup> To create `RelativeFile` I expect I just need to create it, sth like `RelativeFile(filePath)`? |
18:46:30 | FromGitter | <alehander92> please, take a better look through the manual, kristian |
18:46:31 | * | Ven`` joined #nim |
18:46:33 | Araq | I doubt it will pass review but sure |
18:46:38 | * | Hideki_ joined #nim |
18:46:42 | FromGitter | <alehander92> this is under type conversions i think |
18:47:44 | * | blackbeard420 joined #nim |
18:48:34 | FromGitter | <alehander92> hm, what would be the idiomatic way : using some of the `os` split ops? |
18:48:39 | * | hpyc9 joined #nim |
18:48:58 | * | clyybber joined #nim |
18:49:42 | Araq | RelativeFile is compiler specific |
18:49:57 | * | clyybber quit (Client Quit) |
18:50:14 | Araq | you usually don't convert to it, you already have it |
18:50:28 | Araq | or you don't and then you need to sure relativeTo or whatever |
18:50:39 | Araq | *to use |
18:50:42 | FromGitter | <alehander92> but is it doing a check if its actually relative |
18:50:47 | FromGitter | <alehander92> and is it coming to stdlib |
18:51:11 | * | Hideki_ quit (Ping timeout: 260 seconds) |
18:54:27 | Araq | if you use a type conversion, no checking is done as you cannot overload type conversions |
18:58:08 | * | arecaceae quit (Read error: Connection reset by peer) |
18:58:19 | * | tane joined #nim |
18:58:31 | * | arecaceae joined #nim |
18:59:18 | FromGitter | <alehander92> so .. arent they potentially unsafe |
19:00:18 | FromGitter | <alehander92> what i mean is e.g. id want to be able to limit the user to not just convert to relative file |
19:01:04 | * | u0_a121 joined #nim |
19:01:52 | * | tane quit (Client Quit) |
19:02:10 | Araq | it's an internal compiler API |
19:02:18 | Araq | it does exactly what I want it to do |
19:02:26 | Araq | it offers some protection |
19:03:28 | disruptek | only abstinence is 100% effective. |
19:05:13 | FromGitter | <kristianmandrup> how do I equivalent of `"abc".indexOf("b")` ? |
19:05:25 | FromGitter | <kristianmandrup> been looking at strutils |
19:05:27 | Araq | find |
19:05:35 | Araq | system.find |
19:05:39 | FromGitter | <kristianmandrup> yeah, but it complains I'm not using char |
19:05:48 | narimiran | then use char |
19:05:56 | narimiran | find('b') |
19:06:10 | Yardanico | @kristianmandrup if you need to search for a char in a string - use system.find |
19:06:16 | Yardanico | actually there's strutils.find too |
19:06:29 | FromGitter | <kristianmandrup> Hmm, playground keeps crashing |
19:06:44 | FromGitter | <kaushalmodi> @kristianmandrup OK, I won't spam this more.. https://scripter.co/notes/string-fns-nim-vs-python/#find--from-left |
19:11:35 | FromDiscord | <clyybber> disruptek: Have the edibles hit yet? |
19:13:42 | FromGitter | <kristianmandrup> ideally, I'd like a find from right or find last |
19:14:03 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:14:08 | disruptek | yeah, so i'm getting closer. |
19:14:17 | krux02 | Araq: when I add a new since annotation, what version should I pick? |
19:14:31 | krux02 | (1,1) is in the past |
19:14:40 | krux02 | but I don't know the name of the next version |
19:14:49 | krux02 | is it (1,2) |
19:15:12 | disruptek | we use 1,1 in devel |
19:15:15 | FromGitter | <kaushalmodi> @kristianmandrup If you scroll down a little bit on my notes.. you will find [find, index] x [left, right] variants |
19:15:42 | disruptek | (because we want to use it in devel 😉) |
19:17:10 | disruptek | clyybber: we are treating the exp as unsigned when it's signed, somewhere... |
19:17:10 | FromGitter | <kaushalmodi> krux02: I believe it would be (1, 1) |
19:17:16 | disruptek | that's my theory atm, anyway. |
19:17:19 | FromGitter | <kaushalmodi> because we want to test that on devel and the next release (1,2) |
19:17:35 | narimiran | krux02: (1, 1) is not the past, it is the present, and you should use that one |
19:19:13 | krux02 | ok |
19:24:34 | * | nsf quit (Quit: WeeChat 2.7) |
19:25:43 | FromGitter | <kristianmandrup> So I have a proc returning a tuple of strings, however... |
19:26:03 | FromGitter | <kristianmandrup> `result = ("", "")` tells me |
19:26:05 | FromGitter | <kristianmandrup> result = (filePath, content) else: ⏎ result = ("", "")' has no type (or is ambiguous) |
19:26:52 | krux02 | narimiran: 1.1.1 is my current version, so I would expect the next release to have a higher version number |
19:27:04 | narimiran | krux02: that is correct |
19:27:15 | narimiran | but that doesn't contradict with what i said |
19:27:32 | Yardanico | @kristianmandrup did you specify proc return type? |
19:27:42 | krux02 | well for me it does contradict |
19:27:55 | FromGitter | <kristianmandrup> Why is this not valid? |
19:27:58 | narimiran | krux02: ok. |
19:28:00 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e41aec01d23aa47aa0731b3] |
19:28:12 | FromGitter | <kristianmandrup> Oh, double parens :P |
19:28:21 | narimiran | krux02: do you know what is the current stable release of nim? |
19:28:23 | krux02 | buf if you say to use version (1,1) then I will do that |
19:28:30 | krux02 | narimiran, no |
19:28:33 | FromGitter | <kristianmandrup> LOL |
19:28:41 | narimiran | krux02: 1.0.6 |
19:28:55 | krux02 | ok |
19:29:05 | FromGitter | <alehander92> you have one paren too many kristian |
19:29:09 | narimiran | krux02: does this clarify the situation for you? |
19:29:11 | krux02 | so the next release will be 1.1 |
19:29:11 | FromGitter | <alehander92> in ((n: |
19:29:18 | narimiran | krux02: nope. 1.2.0 |
19:29:20 | FromGitter | <alehander92> yea narimiran this is really confusing |
19:29:28 | FromGitter | <alehander92> sorry but this is just super confusing for users |
19:29:32 | krux02 | so version 1.1.1 is an earlier version than 1.1 |
19:29:37 | narimiran | no. |
19:29:37 | krux02 | that is the conflict that I have |
19:29:46 | FromGitter | <alehander92> if i see since 1.1.0 i expect that there was a 1.1.0 somehow once |
19:29:49 | narimiran | 1.1 is devel version |
19:29:51 | FromGitter | <alehander92> where the feature landed first |
19:29:59 | narimiran | like 0.19.1 was, or 0.20.99 was |
19:30:23 | FromGitter | <alehander92> so there will be a 1.1 "final" version |
19:30:30 | narimiran | no. |
19:30:41 | FromGitter | <alehander92> but this just doesnt make sense the future "me" |
19:30:43 | krux02 | so there won't be a 1.1 |
19:30:46 | krux02 | just 1.2 |
19:30:49 | narimiran | yep |
19:30:50 | krux02 | ok |
19:30:55 | krux02 | interesting |
19:31:07 | krux02 | is that written down somwhere? |
19:31:15 | FromGitter | <alehander92> so one day ill find out x is from y.z, but then i'll search for y.z.0 and ill find out it doesnt exist |
19:31:16 | FromGitter | <kaushalmodi> > yea narimiran this is really confusing ⏎ ⏎ It's real simple.. people using devel always see odd numbers, releases have always even minor/micro versions |
19:31:26 | narimiran | otherwise this `.since` thingy wouldn't work (you couldn't test it while in devel) |
19:31:32 | FromGitter | <alehander92> yeeep.. but why should this leak into .since |
19:31:59 | krux02 | reminds me of the emacs versioning scheme |
19:32:03 | FromGitter | <alehander92> well there could be some kind of mode |
19:32:20 | narimiran | please guys, lets not bike-shed over this, huh? |
19:32:26 | FromGitter | <kaushalmodi> @alehander92 I think the reason is that when writing since, we don't exactly know the next release version |
19:32:34 | narimiran | (there's ouplace operator to bikeshed about all day long :P :D) |
19:32:54 | narimiran | we know the next release version |
19:33:08 | FromGitter | <alehander92> well, i am just saying it seems confusing to me for future users :P but if you've agreed this particular argument is wrong, ok |
19:33:09 | FromGitter | <kaushalmodi> e.g. 1.0.6 is released.. and we know for sure that the next major release will at least 1.1.x.. so we use since (1,1) |
19:33:25 | FromGitter | <alehander92> but kaushal thats not my point |
19:33:26 | disruptek | it's not confusing; you're just confused. 😀 |
19:33:33 | FromGitter | <alehander92> my point is that a user in 2024 |
19:33:41 | narimiran | would 1.x.-1 be less confusing? followed by 1.x.0? |
19:33:52 | FromGitter | <alehander92> will find out x is from 1.9, and will try to search for 1.9 to see what happened there |
19:33:54 | narimiran | that's "minus one", not "dash one" |
19:33:56 | FromGitter | <alehander92> but 1.9 doesnt even exist |
19:34:06 | disruptek | the point is that in 1.2 you can look at features added in devel and /know/ that they exist even in the earliest 1.2 version. |
19:34:09 | FromGitter | <alehander92> so how can something be there "since 1.9" if there is no 1.9 |
19:34:20 | narimiran | there is |
19:34:25 | narimiran | i'm currently on 1.1.1 |
19:34:28 | FromGitter | <alehander92> disruptek explain this to my thought experiment guy |
19:34:37 | FromGitter | <kaushalmodi> 1) 9 would be the devel after 1.8 |
19:34:39 | narimiran | and the feature started to exist in 1.1.1 |
19:34:41 | FromGitter | <alehander92> narimiran ok, so there is a "final" 1.1 which becomes 1.2 ? |
19:34:54 | narimiran | ok, if you want to call it that way, yes |
19:34:56 | FromGitter | <kaushalmodi> may be I find this "normal" because emacs releases are named similarly |
19:35:00 | FromGitter | <alehander92> yes, ok |
19:35:04 | FromGitter | <alehander92> no i like the version scheme |
19:35:16 | narimiran | it will be 1.1.1, then 1.2.0 official release, devel becomes 1.3.1, etc. |
19:35:19 | FromGitter | <alehander92> just .since seemed a tad strange to me |
19:35:28 | narimiran | in the mean time there will be 1.2.2, 1.2.4, etc. |
19:36:01 | FromGitter | <alehander92> i guess since can know that and enable 1.2n in 1.2n-1 |
19:36:09 | narimiran | and "devel backport" (stuff that has been backported, but not released yet) also has odd patch number, e.g. 1.0.1, 1.0.3, 1.0.5, etc. |
19:36:45 | FromGitter | <alehander92> because users are expected to know it |
19:36:58 | narimiran | users don't read documentation and generally don't care |
19:37:22 | FromGitter | <alehander92> i mean, programmers using nim |
19:37:58 | narimiran | ok, then say so: people with OCD care very much about version numbers :D :D |
19:38:34 | FromGitter | <alehander92> i thought we were all super pedantic bikeshedding nerds here! |
19:39:15 | narimiran | of course we are :) |
19:40:01 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
19:40:25 | * | sagax quit (Read error: Connection reset by peer) |
19:41:45 | FromGitter | <alehander92> i just learned serbocroatian has like 7 cases today |
19:41:56 | narimiran | for nouns? yep |
19:41:56 | FromDiscord | <clyybber> disruptek: AAAAAH |
19:42:09 | FromGitter | <alehander92> so i respect your child-education-based pedanticness even more |
19:42:15 | narimiran | hahaha |
19:42:28 | FromDiscord | <clyybber> disruptek: I was suspecting it |
19:42:34 | FromGitter | <alehander92> great grammar, i think we managed to remove all of ours |
19:42:47 | FromGitter | <alehander92> i will live near to a serbian guy so i might just learn some more |
19:43:08 | narimiran | we should get rid of at least two of those 7 because they're mostly just a copy-paste of some others |
19:43:14 | FromDiscord | <clyybber> disruptek: Maybe we need ashr in some places |
19:43:40 | narimiran | e.g. miran, mirana, miranu, mirana, miranu, mirane, miranom |
19:44:24 | disruptek | you know what it is? |
19:44:45 | Yardanico | well russian has 6 cases :P |
19:44:48 | FromDiscord | <clyybber> si ti tahw? |
19:45:07 | FromGitter | <alehander92> hmm, miranu is Miran's right |
19:45:17 | * | hax-scramper quit (Ping timeout: 272 seconds) |
19:45:20 | narimiran | nope, that would be miranov |
19:45:26 | FromGitter | <alehander92> ahh |
19:45:28 | narimiran | and has nothing to do with those 7 |
19:45:32 | FromGitter | <alehander92> yeah its hard without context |
19:45:37 | FromGitter | <alehander92> amazing analysis from me |
19:45:40 | * | hax-scramper joined #nim |
19:45:41 | FromGitter | <alehander92> razumeetsia |
19:45:53 | Yardanico | lol |
19:46:19 | disruptek | clyybber: ptal now |
19:46:30 | FromDiscord | <clyybber> aight aight |
19:46:48 | narimiran | miran's something (miranov(a) stvar) is an adjective |
19:46:51 | FromDiscord | <clyybber> @timotheecour ping pong ping |
19:48:16 | narimiran | and 'miranu' means "(i give something) to miran" |
19:48:40 | * | sagax joined #nim |
19:48:59 | Yardanico | same as in russian :o |
19:49:15 | FromGitter | <alehander92> we also have something like this, but i am not sure if verbs really change |
19:49:38 | narimiran | verb changing is completely different thing. and we have that too :D |
19:49:38 | * | hax-scramper quit (Ping timeout: 240 seconds) |
19:49:50 | * | hax-scramper joined #nim |
19:49:53 | narimiran | but ok, even english has that :P |
19:50:03 | FromGitter | <alehander92> miran, na miran, miranov |
19:50:09 | FromDiscord | <clyybber> disruptek: aight, everything fails, but it fails closer |
19:50:14 | narimiran | ok, not for every verb, i guess (english) |
19:50:19 | FromDiscord | <clyybber> 254 is almost <= 199 |
19:50:23 | FromGitter | <alehander92> i really like the miran-ovica thing |
19:50:26 | disruptek | clyybber: no, look at the tests. |
19:50:30 | FromGitter | <alehander92> where miranovica would be your wife |
19:50:36 | disruptek | we cannot pass 1.0 == "1E0" |
19:50:45 | narimiran | i think we should switch to #nim-offtopic for this linguistic stuff :) |
19:50:45 | FromDiscord | <clyybber> disruptek: Eoh |
19:51:35 | disruptek | 1.0 is getting decoded as 00111111100000000000000000000000 |
19:53:14 | FromDiscord | <clyybber> disruptek: but I'm getting the OOB IN basically broken |
19:53:53 | disruptek | yep. you're supposed to. |
19:54:27 | disruptek | it's like floatToBits is broken but common passes the tests. maybe we need another test. |
19:54:33 | FromDiscord | <clyybber> ah, ok. I thought you were getting something different than "1E0" |
19:54:43 | disruptek | i am; it's failing. |
19:54:50 | FromDiscord | <clyybber> disruptek: yeah, I mean like output |
19:54:52 | FromDiscord | <clyybber> not crash |
19:56:07 | FromGitter | <alehander92> narimiran yes i moved it there |
19:56:14 | FromDiscord | <clyybber> how can floatToBits be broken |
19:56:17 | FromDiscord | <clyybber> its so simple |
19:57:35 | FromDiscord | <clyybber> disruptek: floatToBits is only used in the tests? |
19:57:35 | disruptek | well, it doesn't work. |
19:58:03 | disruptek | i'm looking at it. we are getting our sign in the wrong spot. |
19:58:11 | FromDiscord | <clyybber> ah |
19:58:14 | FromDiscord | <clyybber> I missed its usage |
19:58:21 | FromDiscord | <clyybber> snarky snake case |
19:58:25 | disruptek | oh something like that. it just copies memory. |
19:59:10 | disruptek | it works for 0.0 and -0.0, so the sign the fine. but 1.0 becomes 00111111100000000000000000000000 |
19:59:52 | FromDiscord | <clyybber> cant we just replace it with a cast? |
20:01:05 | disruptek | i feel like i must be missing something super obvious. |
20:03:03 | FromDiscord | <clyybber> eh |
20:03:04 | * | fanta1 quit (Quit: fanta1) |
20:03:06 | FromDiscord | <clyybber> call me crazy |
20:03:12 | FromDiscord | <clyybber> but float is float64 |
20:03:32 | disruptek | i know, but semantically... |
20:03:56 | FromDiscord | <clyybber> but floatToBits takes a float32 |
20:08:51 | * | u0_a121 quit (Read error: Connection reset by peer) |
20:11:24 | FromDiscord | <Elegant Beef> typically the data type, int and float corespond to their 32 bit counterpart |
20:11:37 | Yardanico | not in nim |
20:11:37 | FromGitter | <alehander92> varriount |
20:11:42 | FromGitter | <alehander92> is sublime plugin maintained |
20:11:49 | FromDiscord | <Elegant Beef> I know not in nim |
20:11:49 | FromGitter | <alehander92> today |
20:14:47 | * | u0_a121 joined #nim |
20:14:47 | * | u0_a121 quit (Read error: Connection reset by peer) |
20:16:39 | disruptek | clyybber: you know what else i don't get? |
20:16:59 | disruptek | how could the digit table work with less than 128 values? |
20:18:59 | FromDiscord | <clyybber> disruptek: But its 200? |
20:19:07 | disruptek | it's 100. |
20:19:18 | FromDiscord | <clyybber> yeah, 100 pairs |
20:19:23 | FromDiscord | <clyybber> why do we need more? |
20:19:34 | FromDiscord | <clyybber> do/wood |
20:19:38 | FromDiscord | <clyybber> would |
20:19:46 | disruptek | we cannot output a 3-digit exponent. |
20:20:01 | disruptek | afaict |
20:21:38 | disruptek | i guess the exponent sign is sorta up to the impl. |
20:21:55 | FromDiscord | <clyybber> 10 * 10 = 100? |
20:22:00 | FromDiscord | <clyybber> what am *I* missing |
20:22:19 | disruptek | how could it ever output an exponent of 101? |
20:22:43 | disruptek | i think this biased exponent is the source of the bug. |
20:23:24 | * | mahmudov joined #nim |
20:25:00 | FromDiscord | <clyybber> but is it like that in the original implementation? |
20:25:39 | FromDiscord | <clyybber> hmm, somehow a cast doesn't work |
20:25:51 | FromDiscord | <clyybber> a cast always ends up as 0 |
20:27:14 | FromDiscord | <clyybber> disruptek: > it works for 0.0 and -0.0, so the sign the fine. but 1.0 becomes 00111111100000000000000000000000 |
20:27:18 | FromDiscord | <clyybber> but that is correct |
20:27:52 | FromDiscord | <clyybber> first bit for the sign |
20:27:57 | FromDiscord | <clyybber> next 8 for the exponent |
20:28:00 | FromDiscord | <clyybber> which is 127 here |
20:28:08 | FromDiscord | <clyybber> and the rest of it, the mantissa all zero |
20:28:12 | disruptek | yep, so 2e^-127 is 1. |
20:28:13 | Zevv | Dudes you guys need a toy |
20:28:14 | Zevv | http://evanw.github.io/float-toy/ |
20:28:18 | FromDiscord | <clyybber> https://www.h-schmidt.net/FloatConverter/IEEE754.html |
20:28:37 | FromDiscord | <clyybber> Zevv: Beat me, thanks |
20:29:07 | disruptek | cute, but it doesn't change the problem. |
20:29:18 | FromDiscord | <clyybber> what IS the problem though? |
20:29:22 | FromGitter | <alehander92> zevv nice ui |
20:29:23 | FromDiscord | <clyybber> floatToBits definitely isnt |
20:29:27 | disruptek | how could we ever expect to index a 200-item array with 2*127? |
20:29:30 | FromGitter | <alehander92> i need to continue with my memory ui.. |
20:29:42 | * | mahmudov left #nim ("Leaving") |
20:29:43 | FromDiscord | <clyybber> disruptek: Aah |
20:29:49 | disruptek | you feel me? |
20:30:31 | disruptek | do you have an exam you should be studying for? |
20:30:39 | FromDiscord | <clyybber> nope, the storm saved me |
20:30:53 | disruptek | you mean, it bought you more study time. 😉 |
20:31:05 | FromDiscord | <clyybber> lol |
20:31:11 | FromGitter | <alehander92> clyybber arent you old |
20:31:18 | FromDiscord | <clyybber> im 19 |
20:31:19 | FromGitter | <alehander92> i imagined you like 35+ |
20:31:21 | FromGitter | <alehander92> man |
20:31:24 | FromDiscord | <clyybber> lol |
20:31:40 | FromGitter | <alehander92> lovely, good, cherish your youth |
20:31:50 | FromGitter | <alehander92> wow this sounds like 19th century byron |
20:32:27 | disruptek | so anyway... |
20:32:43 | FromGitter | <alehander92> sorry for disrupting you |
20:33:13 | narimiran | 35+ considered old :( |
20:33:24 | * | luis_ quit (Quit: luis_) |
20:33:29 | FromDiscord | <clyybber> old considered harmful |
20:33:49 | * | luis_ joined #nim |
20:33:53 | disruptek | ahh, this is what our FloatBias constant is for. |
20:35:37 | FromGitter | <kaushalmodi> 35+ considered old :( |
20:36:39 | FromGitter | <alehander92> come on guys |
20:36:43 | FromGitter | <alehander92> i am getting married this week |
20:36:49 | disruptek | really? |
20:36:52 | FromGitter | <alehander92> i will be old on monday as well :) |
20:37:04 | disruptek | how come i didn't get a wedding invite? |
20:37:10 | FromGitter | <alehander92> is this how it works |
20:37:14 | disruptek | of course. |
20:37:15 | narimiran | married before getting your driver's licence? |
20:37:16 | FromDiscord | <Elegant Beef> i mean at 36 you have to start using a walker |
20:37:22 | narimiran | priorities, man |
20:37:32 | FromGitter | <alehander92> my grandpa was born in 1914 |
20:37:35 | disruptek | i guess we can show up uninvited, if you prefer. |
20:37:49 | FromDiscord | <Elegant Beef> Just show up and start evangalising nim |
20:37:53 | * | luis_ quit (Client Quit) |
20:38:00 | FromGitter | <alehander92> narimiran i got like 4 exams |
20:38:04 | FromGitter | <alehander92> i got really close the last time |
20:38:07 | FromDiscord | <Elegant Beef> "Have you ever wanted a statically typed programming language that uses already installed system runtimes?" |
20:38:15 | FromGitter | <alehander92> disruptek i really thoight about doing it |
20:38:20 | FromGitter | <alehander92> i was going to invite PMunch |
20:38:26 | FromGitter | <alehander92> and the others on fosdem |
20:38:36 | FromGitter | <alehander92> but its like i just didnt |
20:38:38 | disruptek | you just don't love us. i get it. |
20:38:53 | FromGitter | <alehander92> you're more special to me |
20:38:54 | FromDiscord | <clyybber> spare the missing love for your wife |
20:39:15 | FromGitter | <alehander92> she missed bojack horseman from time to time |
20:39:53 | FromGitter | <alehander92> disruptek i invite you and rayman and your truck to plovdiv |
20:39:57 | FromGitter | <alehander92> in may |
20:40:22 | disruptek | plovdiv? |
20:40:48 | disruptek | that's a wet drive, looks like. |
20:40:50 | FromGitter | <alehander92> it has great stuff, like 7 hills which look like 4 and overpopulation of cats |
20:41:12 | * | marmotini_ quit (Remote host closed the connection) |
20:41:20 | disruptek | nice mountain views. |
20:41:44 | * | marmotini_ joined #nim |
20:42:17 | FromGitter | <alehander92> https://images.myguide-cdn.com/bulgaria/companies/the-old-town-of-plovdiv/large/the-old-town-of-plovdiv-161252.jpg |
20:42:43 | FromGitter | <alehander92> yes, i try to make nimconf here from months |
20:42:54 | FromDiscord | <clyybber> cozy |
20:42:55 | disruptek | may might be a little warm. |
20:42:58 | FromGitter | <alehander92> but after my podcats becomes super succesful, it would be easier |
20:43:20 | FromGitter | <alehander92> yes, it gets 40-ish degrees sometimes |
20:43:32 | FromGitter | <alehander92> ok, then i'll come to the usa, no worries |
20:44:26 | disruptek | if it's the us, it's probably nyc or sf, tbh. |
20:44:31 | leorize | like 40C? |
20:44:34 | leorize | damn that's hot |
20:44:43 | FromGitter | <alehander92> i really feel like a midwest boomer guy sometimes |
20:45:14 | disruptek | i guess it's not too bad in may; average high of ~36. |
20:45:18 | FromGitter | <alehander92> yes, thats why you have all the cats i guess |
20:45:50 | disruptek | fall seems like better temps and less rain. |
20:45:55 | FromGitter | <alehander92> where is that ~36? i imagine california is somethign like france |
20:45:57 | FromGitter | <alehander92> as weather |
20:46:37 | FromGitter | <alehander92> may is great, its warm enough |
20:46:43 | * | marmotini_ quit (Ping timeout: 272 seconds) |
20:47:34 | Zevv | what is 'expr' in 0.12 Nim? |
20:47:48 | leorize | untyped |
20:47:49 | narimiran | Zevv: most likely 'untyped' |
20:48:03 | FromGitter | <alehander92> but if anyone is around this week, feel welcome(such a copout man!!!) at least zah is coming |
20:48:24 | disruptek | i'll say a little prayer for ya, alehander. |
20:49:07 | Zevv | narimiran: tnx |
20:49:33 | * | u0_a121 joined #nim |
20:51:22 | disruptek | clyybber: so again... how the hell is this supposed to work? |
20:52:01 | * | u0_a121 quit (Read error: Connection reset by peer) |
20:52:11 | FromDiscord | <clyybber> no idea, but it works in C |
20:52:22 | FromDiscord | <clyybber> so we must miscalculate somewhere |
20:53:13 | disruptek | it's only copying two digits. and the output never includes two digits side-by-side. so that means that branch cannot possibly run in the c version. |
20:53:53 | disruptek | we output 0 in the opposite branch, added to exp. so exp is 0 in the c version. |
20:54:36 | disruptek | it can only be zero if the parsed exponent is added to the output length and the -1 and yields zero. |
20:54:44 | FromGitter | <alehander92> disruptek love it |
20:54:53 | disruptek | ergo, with olength==1 it must be zero as decoded. |
20:54:57 | disruptek | but it's 127 for us. |
20:55:04 | * | u0_a121 joined #nim |
20:55:55 | disruptek | we need to sub the bias. |
20:56:10 | disruptek | let's do it right where we assgn exp. |
20:56:52 | disruptek | hmm, it didn't work. maybe i did it wrong. |
20:57:28 | * | marmotini_ joined #nim |
20:59:57 | * | u0_a121 quit (Read error: Connection reset by peer) |
21:01:30 | Zevv | story of my life :/ |
21:01:46 | disruptek | right? |
21:01:52 | Zevv | wrong! |
21:02:09 | disruptek | often-wrong disruptek |
21:02:19 | * | marmotini_ quit (Ping timeout: 260 seconds) |
21:02:28 | disruptek | that was a pretty cool plotline. |
21:03:54 | FromDiscord | <clyybber> disruptek: Do you have bazel by chance? |
21:04:00 | disruptek | yeah. |
21:04:19 | disruptek | yeah, i have a working c build. |
21:04:19 | FromDiscord | <clyybber> might be worth inserting a print call after the exp >= 10 branch |
21:04:27 | FromDiscord | <clyybber> to see what exp is on ulfjack |
21:04:34 | FromDiscord | <clyybber> nice |
21:04:41 | disruptek | yeah, but i think this is solvable here. |
21:04:58 | FromDiscord | <clyybber> yeah, sure, but then we at least now where our exp differs |
21:04:59 | FromDiscord | <clyybber> or how |
21:06:23 | disruptek | the result we want is to output (at index [0]) a '1'. |
21:07:18 | disruptek | but the output starts off as zero because it's copied from the mantissa, which is of course 0. |
21:08:08 | FromDiscord | <clyybber> does e10 differ? |
21:08:27 | FromDiscord | <clyybber> between c and nim I mean |
21:08:56 | disruptek | jeeze, i dunno. i don't worry about e10 yet. |
21:09:21 | disruptek | i think i have to remove the bias and carry the one to the mantissa but i don't really understand why that would be right. |
21:09:43 | FromDiscord | <clyybber> eh, dont differ from C |
21:09:51 | FromDiscord | <clyybber> exp is wrong |
21:09:57 | FromDiscord | <clyybber> exp is e10 + removed |
21:10:03 | FromDiscord | <clyybber> so either removed or e10 is wrong |
21:10:15 | * | Ven`` joined #nim |
21:10:18 | disruptek | i think you're looking at the wrong exp. |
21:10:43 | disruptek | look at the end of to_chars |
21:10:50 | FromDiscord | <clyybber> argh |
21:10:55 | FromDiscord | <clyybber> sorry |
21:11:37 | FromDiscord | <clyybber> do you already know which part is wrong? |
21:11:49 | FromDiscord | <clyybber> v.exponent or olength? |
21:12:07 | disruptek | exponent |
21:12:44 | disruptek | but if we change it, it follows that mantissa changes, which follows that we must add one -- because the output we want is chr('0'.ord + mantissa) |
21:14:23 | disruptek | i think it worked but the test failed somehow. |
21:15:41 | disruptek | what did you do to fix the stripping thing? |
21:15:45 | FromDiscord | <clyybber> is our ieeeExponent correct? |
21:16:01 | FromDiscord | <clyybber> disruptek: I did .strip(chars = {'\0'}) |
21:16:07 | disruptek | it is what it is. |
21:16:19 | FromDiscord | <clyybber> yeah, but is it the same |
21:16:23 | FromDiscord | <clyybber> between nim and c? |
21:16:43 | disruptek | okay, that fixed it. |
21:16:53 | FromDiscord | <clyybber> oh, nice |
21:17:56 | disruptek | pushed that |
21:18:49 | FromDiscord | <clyybber> pulled that |
21:18:59 | * | u0_a121 joined #nim |
21:20:59 | disruptek | i wonder if the order of these tests is deliberate. |
21:21:30 | * | narimiran quit (Ping timeout: 265 seconds) |
21:21:54 | disruptek | i mean, maybe the subnormal failure tells us that the fix is wrong. |
21:22:08 | FromDiscord | <clyybber> disruptek: Why did you have to put the var exp somewhere else? |
21:22:40 | FromDiscord | <clyybber> I don't get why we need to do something different than the C version |
21:22:56 | FromDiscord | <clyybber> and when we do, its gonna make debugging the other failing tests more difficult? |
21:23:09 | disruptek | relax. we're learning. |
21:23:29 | FromDiscord | <clyybber> sure, but I wonder why we are differing in the first place |
21:24:18 | FromDiscord | <clyybber> I mean, if we do something the C version must not do, we are doing something wrong |
21:24:24 | FromDiscord | <clyybber> and just applying flextape |
21:24:25 | disruptek | because for whatever reason, our floats are biased. |
21:25:05 | disruptek | you can ask them, but you cannot trust that their answer is fair. |
21:25:11 | FromDiscord | <clyybber> and they are not in the C version? |
21:25:13 | FromDiscord | <clyybber> lol |
21:25:40 | disruptek | i think they are unbiased in the c version, yes. |
21:26:36 | disruptek | oh, it's because our types are unsigned, i guess. |
21:29:41 | disruptek | i wonder if we have this stuff use signed ints if it'll just magically work. |
21:29:52 | FromDiscord | <clyybber> so, fixed? |
21:30:02 | disruptek | something i might try. |
21:30:31 | FromDiscord | <clyybber> disruptek: Did you do any other more extensive changes other than the last 2 commits? |
21:30:51 | disruptek | i mean, shit man, i dunno. |
21:30:58 | disruptek | you can look at the repo. |
21:31:09 | disruptek | i would say `no`. |
21:31:37 | disruptek | i fixed a few things. |
21:32:00 | FromDiscord | <clyybber> but not fixed as in reordered code? |
21:32:36 | * | MyMind quit (Quit: WeeChat 2.7) |
21:32:51 | FromDiscord | <clyybber> eh, void doesn't have bazel : / |
21:38:04 | * | marmotini_ joined #nim |
21:39:58 | * | marmotini_ quit (Read error: No route to host) |
21:40:13 | * | marmotini_ joined #nim |
21:41:23 | * | kaiyin joined #nim |
21:41:48 | kaiyin | Is there a way to turn off `noSideEffect` checks globally? |
21:42:29 | FromDiscord | <clyybber> nope, afaik |
21:46:53 | * | oculux quit (Ping timeout: 272 seconds) |
21:47:06 | * | oculux joined #nim |
21:51:19 | Yardanico | kaiyin: what for though? if you don't want them, just don't use noSideEffect or "func" |
21:51:54 | kaiyin | For library code from another person. |
21:52:35 | kaiyin | I could just get the code and remove all the noSideEffect, yes, but that would be a big surgery for some debugging. |
21:53:41 | disruptek | clyybber: we'll just do this in floattobits. |
21:56:40 | * | oculux quit (Ping timeout: 268 seconds) |
21:56:48 | disruptek | i mean, when we create FloatingDecimal |
21:57:41 | leorize | kaiyin: use `{.noSideEffects.}: <code here>` |
21:57:52 | * | oculux joined #nim |
21:57:55 | leorize | that'll instruct the compiler to not compute the effect in that block |
21:58:19 | * | Zectbumo joined #nim |
22:00:26 | FromDiscord | <clyybber> disruptek: ieeeExponent |
22:00:30 | FromDiscord | <clyybber> is sometimes wrong |
22:00:37 | FromDiscord | <clyybber> unless you also reordered the tests |
22:01:51 | FromDiscord | <clyybber> nope |
22:01:53 | FromDiscord | <clyybber> its wrong |
22:02:11 | FromDiscord | <clyybber> nevermind |
22:02:17 | disruptek | it's because you have to bias it by 127. |
22:02:26 | FromDiscord | <clyybber> nah, its alright |
22:02:33 | FromDiscord | <clyybber> I was diffing between the tests of C and nim |
22:03:03 | FromDiscord | <clyybber> so this must be wrong: |
22:03:14 | FromDiscord | <clyybber> `exponent: ieeeExponent.int32` |
22:03:19 | FromDiscord | <clyybber> why convert to int32 here? |
22:03:43 | disruptek | it's signed, but it should be -127. |
22:04:11 | disruptek | 460 says we think it's unsigned. |
22:04:34 | disruptek | that matches the c. |
22:05:16 | FromDiscord | <clyybber> huh, the C calls f2d? |
22:05:28 | FromDiscord | <clyybber> and f2d does not convert ieeeExponent to int32 |
22:05:44 | disruptek | if we make that signed, it should flip 127 to 0. |
22:06:49 | disruptek | yeah, that's what i'm saying. |
22:07:07 | FromDiscord | <clyybber> but why don't we use f2d? |
22:08:36 | FromDiscord | <clyybber> disruptek: I don't understand this |
22:09:18 | disruptek | this is so broken. |
22:09:19 | disruptek | lol |
22:09:22 | FromDiscord | <clyybber> yeah |
22:09:32 | disruptek | yeah; we should call it and we don't. |
22:09:34 | FromDiscord | <clyybber> but why do we not use f2d here? |
22:09:37 | FromDiscord | <clyybber> ah |
22:09:42 | FromDiscord | <clyybber> so it was an oversight? |
22:09:46 | disruptek | i think i transcribed it wrong somehow. |
22:10:06 | FromDiscord | <clyybber> hehe |
22:10:12 | FromDiscord | <clyybber> I'm inclined to do it all over again |
22:10:13 | disruptek | it's confusing because the c listed the type first, which made me just instantiate it. |
22:10:21 | FromDiscord | <clyybber> ah |
22:11:29 | kaiyin | leorize, that works. thanks! |
22:12:15 | * | oculux quit (Ping timeout: 265 seconds) |
22:12:23 | disruptek | pushed |
22:12:27 | * | oculux joined #nim |
22:15:56 | FromDiscord | <clyybber> disruptek: But its still not working... |
22:16:51 | FromDiscord | <clyybber> well, at least we are now getting range errors |
22:17:03 | FromDiscord | <clyybber> so lets hope that was the last transcription error |
22:17:34 | FromDiscord | <clyybber> oh no |
22:17:41 | FromDiscord | <clyybber> we are getting inaccuracies |
22:17:44 | FromDiscord | <clyybber> we are doomed |
22:19:42 | * | marmotini_ quit (Remote host closed the connection) |
22:20:15 | * | marmotini_ joined #nim |
22:20:42 | disruptek | lol |
22:21:33 | disruptek | is this even wrong? |
22:22:24 | FromDiscord | <clyybber> yeah |
22:22:30 | FromDiscord | <clyybber> I think so |
22:22:51 | disruptek | i don't get it. |
22:24:10 | * | hinst quit (Remote host closed the connection) |
22:24:26 | * | marmotini_ quit (Ping timeout: 240 seconds) |
22:25:04 | FromDiscord | <clyybber> f2s(33554450.0) == "3.355445E7" |
22:25:04 | FromDiscord | <clyybber> f2s(33554450.0) was 3.3554428E7 |
22:25:16 | disruptek | i think that exponent should be unbiased. |
22:25:41 | FromDiscord | <clyybber> wdym with biased? |
22:26:16 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:26:52 | disruptek | so 127 is what's going in, but the way the math works, we need it to be zero. |
22:27:13 | FromDiscord | <clyybber> check if we really do, check in the C version |
22:27:53 | disruptek | well, it's not a transcription error. |
22:29:29 | disruptek | i would probably fix this so mantissas and exponents are typeclasses that include uint24, int24, int8, uin8, etc. |
22:30:18 | disruptek | they will just be a union type that mirrors whatever you throw at it. |
22:30:19 | FromDiscord | <clyybber> but the C version can live without them |
22:30:26 | FromDiscord | <clyybber> we should first see whats wrong |
22:30:32 | disruptek | of course. |
22:32:13 | disruptek | why do we subtract mantissa bit count from e2? |
22:33:51 | FromDiscord | <clyybber> where? |
22:36:45 | disruptek | well, look at it this way: |
22:36:59 | disruptek | it's computing an exponent of -8 right now, for the value 1.0. |
22:38:34 | disruptek | it's 2^-23 when it should be 2^0. know what else is 23? mantissa bit count. |
22:40:02 | FromDiscord | <clyybber> does it work with it not subtracted? |
22:40:13 | * | Trustable quit (Remote host closed the connection) |
22:40:39 | disruptek | wow, m2 is wrong, too. |
22:40:57 | FromDiscord | <clyybber> how? |
22:40:59 | disruptek | oh, i bet i need to pad my bit mask. |
22:41:11 | * | Zectbumo quit (Read error: Connection reset by peer) |
22:42:08 | FromDiscord | <clyybber> lets see who can get it to work first |
22:42:20 | FromDiscord | <clyybber> I'm gonna redo it from scratch |
22:42:35 | disruptek | oh c'mon, it's not worth that. |
22:43:24 | FromDiscord | <clyybber> yeah probably |
22:43:37 | FromDiscord | <clyybber> thats why who wins first wins |
22:43:52 | FromDiscord | <Recruit_main_70007> finishes?* |
22:44:05 | FromDiscord | <clyybber> yeah |
22:44:28 | FromDiscord | <clyybber> disruptek: I will stop if you get it to work |
22:44:47 | FromDiscord | <clyybber> but if you don't, then at least we have two broken translations :p |
22:47:03 | FromDiscord | <clyybber> disruptek: Better idea |
22:47:21 | FromDiscord | <clyybber> maybe the fixes fucked it up |
22:47:40 | FromDiscord | <clyybber> maybe reverting to a previous commit |
22:47:44 | FromDiscord | <clyybber> like waay previous |
22:47:50 | FromDiscord | <clyybber> and doing the f2d thing |
22:47:54 | FromDiscord | <clyybber> makes everything work? |
22:48:25 | * | Hideki_ joined #nim |
22:48:31 | disruptek | probably worth trying, but i'm guessing with these fixes. they should be fixes, afaict. |
22:48:46 | disruptek | i mean, /i'm not guessing/ when i fix something. |
22:48:49 | FromDiscord | <clyybber> but why are they needed? |
22:49:05 | disruptek | which one, specifically? |
22:49:10 | FromDiscord | <clyybber> I mean, why does the C version not need them? |
22:49:16 | FromDiscord | <clyybber> disruptek: Like the mantissa one |
22:49:19 | FromDiscord | <clyybber> where we subtract it |
22:49:28 | disruptek | i really don't know. |
22:49:49 | FromDiscord | <clyybber> hmm |
22:49:56 | disruptek | but i know that 1 * 2^0 == 1 |
22:50:51 | FromDiscord | <clyybber> 1111111111111111111111111111111111 |
22:50:58 | FromDiscord | <clyybber> :p |
22:52:50 | * | Hideki_ quit (Ping timeout: 240 seconds) |
22:55:05 | disruptek | it's definitely my mask. |
23:00:20 | FromDiscord | <clyybber> which one? |
23:04:49 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:06:47 | * | Ven`` joined #nim |
23:07:09 | FromDiscord | <clyybber> disruptek: success? |
23:08:23 | * | Ven`` quit (Client Quit) |
23:14:16 | FromGitter | <deech> Just published Nim bindings to LibClang: https://github.com/deech/libclang_bindings |
23:15:03 | FromDiscord | <clyybber> nice! |
23:19:26 | * | kaiyin quit (Remote host closed the connection) |
23:20:10 | FromDiscord | <treeform> deech, what are you going to do with the lib now that you have wrapped it? |
23:20:50 | FromGitter | <deech> Semi-automate bindings to C++. |
23:21:14 | FromGitter | <deech> Maybe nimterop could depend on it as well |
23:22:06 | FromDiscord | <treeform> ok |
23:38:08 | * | lritter joined #nim |
23:46:21 | stefantalpalaru | deech, you can plug it into c2nim for better C and C++ parsing. Look at how Zig does it. |
23:47:08 | FromGitter | <deech> Or that. |
23:48:31 | FromGitter | <deech> I still think it has to be semi-automated. Friction free auto binding to C++ does not exist AFAIK. Even D folk are struggling with it. Should work for C quite well though. |