00:04:01 | * | Guest32153 quit (Ping timeout: 255 seconds) |
00:06:46 | * | muffindrake quit (Ping timeout: 240 seconds) |
00:10:39 | * | blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in) |
00:10:58 | * | blackbeard420 joined #nim |
00:11:28 | * | marmotini_ joined #nim |
00:11:48 | * | marmotini_ quit (Remote host closed the connection) |
00:12:20 | * | marmotini_ joined #nim |
00:15:50 | disruptek | all this time i thought it was a perl interpreter. |
00:16:58 | * | marmotini_ quit (Ping timeout: 256 seconds) |
00:19:20 | FromDiscord | <mratsim> system.nim is so bug that you cannot use git blame on it anymore via the Github interface: https://github.com/nim-lang/Nim/blame/b6924383df63c91f0ad6baf63d0b1aa84f9329b7/lib/system.nim#L104 |
00:21:28 | * | muffindrake joined #nim |
00:22:42 | * | krux02_ joined #nim |
00:25:14 | * | krux02 quit (Ping timeout: 256 seconds) |
00:31:25 | stefantalpalaru | Freudian slip? :-) |
00:31:57 | * | Hideki_ joined #nim |
00:33:14 | * | Hideki_ quit (Remote host closed the connection) |
00:33:28 | * | Hideki_ joined #nim |
00:44:17 | * | krux02_ quit (Remote host closed the connection) |
00:46:38 | * | a_chou joined #nim |
00:46:43 | * | a_chou quit (Client Quit) |
00:49:30 | * | Hideki_ quit (Remote host closed the connection) |
00:51:11 | * | Hideki_ joined #nim |
00:55:30 | * | GaveUp quit (Quit: You're a bloody puppet!) |
00:55:30 | * | Hideki_ quit (Ping timeout: 256 seconds) |
00:55:54 | * | GaveUp joined #nim |
00:58:13 | FromDiscord | <Rika> It's working just fine on my phone |
00:58:18 | FromDiscord | <Rika> What am I supposed to see instead |
01:07:11 | FromDiscord | <Elegant Beef> Sorta curious has anyone thought about implementing nim for gameplay programming in panda3D? It's C++ based and uses C++ or python for gameplay programming, so atleast my small brain think it's doable |
01:09:15 | * | dwdv quit (Ping timeout: 240 seconds) |
01:10:05 | dadada | https://play.nim-lang.org/#ix=2dq7 |
01:10:49 | dadada | what I was trying to do here was to write a macro that can dynamically import modules |
01:11:27 | FromDiscord | <Rika> Mhm and the issue is |
01:13:31 | dadada | while with manual import statements importing modules from the same directory works here I had to use absolute paths for the import here |
01:13:56 | * | couven92 quit (Ping timeout: 268 seconds) |
01:14:27 | dadada | if I try to use the relative method (no path to dir given) nim says: |
01:14:38 | dadada | .choosenim/toolchains/nim-1.0.6/lib/core/macros.nim(564, 8) Error: cannot open file |
01:15:07 | dadada | maybe because it looks for it relative to the lib/core/ directory?! |
01:18:05 | dadada | ok, can tentatively confirm this is the reason, it looks for modules in lib/core/ , not the project directory |
01:18:20 | dadada | is this a bug in nim? |
01:20:01 | FromDiscord | <Rika> Maybe unintended behavior |
01:20:58 | FromDiscord | <Rika> I feel it's a similar idea to why async stack traces point to some function in macros with the same name as the buggy function + Iter |
01:24:17 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:29:10 | dadada | it probably loses/changes the working directory along the way |
01:29:17 | dadada | with this change it works: https://play.nim-lang.org/#ix=2dqi |
02:00:45 | shashlick | dadada: what does your code look like to get that error |
02:01:40 | shashlick | Use currentSourcePath to know where you are |
02:02:25 | dadada | shashlick: it looks like this https://play.nim-lang.org/#ix=2dq7 |
02:03:23 | dadada | and of course with a module ... sorry, I can't show you the original code quickly, because it's messy, should be easy to reproduce though |
02:04:22 | dadada | this is really a small issue and there's already a workaround |
02:05:22 | shashlick | Probably because parseStmt is in macros |
02:05:34 | shashlick | And path becomes relative to that path |
02:05:44 | shashlick | Which is why you need to pass path |
02:06:29 | shashlick | Which you get from currentSourcePath |
02:17:30 | * | rockcavera quit (Remote host closed the connection) |
02:18:12 | * | actuallybatman quit (Quit: Lost terminal) |
02:27:37 | FromGitter | <gogolxdong> Anyone knows how to debug Nim program with valgrind? |
02:50:08 | disruptek | run with --debuginfo -d:useMalloc and --embedsrc |
02:50:21 | disruptek | s/run/compile/ |
02:55:00 | rayman22201 | @shashlick, re: your generics / plugin thing. It's kind of impossible what you want to do. Generics are by definition a compile time thing, and dynamic linking is a runtime thing. They don't mix. You have to either make each plugin dll compile it's own instantiated copy of the generic, or do some kind of dynamic dispatch instead of generics, like disruptek suggested. |
02:57:40 | * | chemist69 quit (Ping timeout: 256 seconds) |
02:59:44 | * | chemist69 joined #nim |
03:12:11 | FromGitter | <gogolxdong> Which is better, Nim profile/memProfiler or third party debug tools like valgrind? |
03:13:22 | * | muffindrake1 joined #nim |
03:16:02 | * | muffindrake quit (Ping timeout: 256 seconds) |
03:17:35 | * | marmotini_ joined #nim |
03:18:59 | shashlick | @rayman22201: ya I figured, for now, both main app and plugins will have to have their own copy of the code - shouldn't be too bad but was curious if i could minimize it |
03:19:37 | shashlick | anything that isn't generic, i'm trying to reduce the redundancy |
03:20:05 | * | disbot quit (Quit: Bye) |
03:20:05 | * | disruptek quit (Quit: Bye) |
03:22:30 | * | endragor joined #nim |
03:25:19 | rayman22201 | 👍 |
03:26:21 | * | dadada quit (Ping timeout: 265 seconds) |
03:27:42 | * | dadada joined #nim |
03:28:05 | * | dadada is now known as Guest54911 |
03:32:30 | rayman22201 | @gogolxdong probably valgrind |
03:42:01 | * | marmotini_ quit (Remote host closed the connection) |
03:55:09 | * | disbot joined #nim |
03:56:09 | * | disruptek joined #nim |
03:58:14 | FromGitter | <gogolxdong> oh, thanks, will have a try. |
03:59:42 | rayman22201 | https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-with-valgrind |
04:14:45 | * | arecaceae quit (Remote host closed the connection) |
04:15:09 | * | arecaceae joined #nim |
04:45:35 | * | hax-scramper quit (Ping timeout: 258 seconds) |
04:49:35 | * | nsf joined #nim |
04:49:52 | * | dddddd quit (Remote host closed the connection) |
05:08:01 | * | adalricus joined #nim |
05:52:11 | * | Guest32153 joined #nim |
05:53:40 | * | silvernode joined #nim |
05:55:08 | silvernode | So I ran out of time last night but here is some code I was having issues with https://play.nim-lang.org/#ix=2dr1 |
06:02:42 | * | muffindrake1 quit (Quit: muffindrake1) |
06:03:30 | * | muffindrake joined #nim |
06:10:56 | * | narimiran joined #nim |
06:17:15 | * | leorize joined #nim |
06:23:08 | vegai | silvernode: just a minor syntax issue there. You want "=" instead of ":" on the function definition line |
06:23:20 | * | silvernode quit (Ping timeout: 258 seconds) |
06:23:27 | vegai | see https://nim-by-example.github.io/procs/ for instance |
06:24:35 | narimiran | vegai: yeah, i told him that yesterday, but i guess he went offline (like now, too) and didn't see it |
06:25:22 | vegai | oh right |
06:25:32 | vegai | there's a downside to ignoring all parts and joins in IRC I guess :P |
06:26:07 | narimiran | i'm also ignoring all of the messages, but i realized now he's offline because my tab-completion couldn't find his nick |
06:26:39 | * | Guest54911 is now known as dadada |
06:26:45 | leorize | is it weird that I don't hide them? |
06:27:08 | narimiran | but this "i'll ask some question, then i won't stay and wait for answers" is silly IMO |
06:27:13 | narimiran | leorize: yes, you're weird |
06:27:22 | dadada | maybe we could have a bot that notices messages written to people that have disappeared, saves them, and writes them to those people again, once they reappear |
06:27:45 | narimiran | dadada: don't encourage that behaviour |
06:28:02 | leorize | usually a bouncer would do just fine |
06:28:23 | leorize | irccloud is a well known provider if you don't have your own server |
06:29:00 | dadada | narimiran: yu're righ it's silly, some people also have bad connections |
06:29:03 | dadada | you're |
06:29:05 | dadada | right |
06:29:28 | FromDiscord | <Elegant Beef> i'd like to see it ping discord users 😄 |
06:29:30 | narimiran | and this bad connection always triggers right after asking a question? :D |
06:29:58 | leorize | we just need a better discord bot :P |
06:30:12 | leorize | bridge* |
06:30:16 | FromDiscord | <Elegant Beef> Yea |
06:30:47 | FromDiscord | <Elegant Beef> [ElegantBeef] or something similar should basically do @ElegantBeef#5502 |
06:31:13 | narimiran | wait, if i do @discord_username, it doesn't ping that persion? |
06:31:19 | FromDiscord | <Elegant Beef> Nope |
06:31:23 | FromDiscord | <Elegant Beef> It reads it as text |
06:31:25 | narimiran | ouch, had no idea |
06:31:28 | FromDiscord | <Elegant Beef> @Elegant Beef is a ping to me |
06:31:35 | FromDiscord | <Elegant Beef> Idk what it says for you guys |
06:31:42 | leorize | try talking in #offtopic |
06:31:49 | FromDiscord | <Elegant Beef> It's not linked to discord IIRC |
06:31:54 | leorize | which is bridged to #nim-offtopic via a bot Yardanico made |
06:32:02 | leorize | if they kept it on, ofc |
06:32:06 | FromDiscord | <Rika> pings require a certain syntax |
06:32:25 | leorize | @Elegant Beef: the bot seems to be online, you can try |
06:32:25 | FromDiscord | <Elegant Beef> or the bot just interpreting |
06:32:26 | * | silvernode joined #nim |
06:32:28 | FromDiscord | <Rika> ah, cant type them out anymore |
06:32:44 | FromDiscord | <Rika> \<\@259277943275126785> |
06:32:45 | leorize | silvernode: see the irc log for the answer to your question |
06:32:46 | * | ptdel quit (Ping timeout: 240 seconds) |
06:32:52 | FromDiscord | <Rika> thats the ping syntax for @Rika |
06:33:07 | FromDiscord | <Rika> just explaining |
06:33:16 | FromDiscord | <Elegant Beef> Yea i mean the bot can easily look for a user with a specific name when [NameHere] |
06:33:54 | silvernode | leorize: Was just trying to figure out how to do that with my irc client but I will probably need to find the public web log for freenode |
06:34:10 | leorize | https://irclogs.nim-lang.org |
06:34:26 | silvernode | leorize: Thank you |
06:34:32 | leorize | we log our chats :) you can find the link in the channel banner |
06:34:39 | narimiran | silvernode: we answered your questions, both today and yesterday, take a look :) |
06:34:52 | FromDiscord | <Elegant Beef> But how can i be a closeted racist if this is being logged 😛 |
06:35:42 | silvernode | narimiran: Wow this is just a great community, you even remembered me from yesterday |
06:35:53 | FromDiscord | <Elegant Beef> Im actually pretty suprised this bridge doesnt handle mentions |
06:36:33 | silvernode | Omg I was missing the = , I mak that mistake a lot because of Python embedded in my brain |
06:37:46 | * | theelous3 quit (Ping timeout: 256 seconds) |
06:37:50 | * | adalricus quit (Quit: ERC (IRC client for Emacs 26.3)) |
06:38:55 | silvernode | Thank you all for the help. I am working on making a text based space ship trading game |
06:40:15 | silvernode | I am not good at structuring my code when it comes to this game I want to make but started with creating files with various proc and type definitions. |
06:41:10 | silvernode | https://github.com/silvernode/space-nim/tree/experimental |
06:43:54 | silvernode | still pending invite for disruptek to join the project |
06:47:11 | FromDiscord | <Elegant Beef> i mean if it was a game with actual graphics i'd not be opposed to help here and there but text isnt my cup of tea 😄 |
06:47:53 | FromDiscord | <Elegant Beef> i have a relatively untested ECS that could interest you |
06:48:48 | silvernode | Elegant Beef, I would like to do graphics but I think it is best for me to start small since I am still learning the language and concepts of programming in general. |
06:49:26 | FromDiscord | <Elegant Beef> Ah being new to programming i can understand the allure of CLI |
06:49:36 | FromDiscord | <Elegant Beef> I'd suggest using illwill for drawing UIs |
06:49:45 | FromDiscord | <Elegant Beef> I'd suggest using illwill for drawing nice CLIs |
06:49:59 | leorize | well nice clis comes later |
06:50:04 | FromDiscord | <Elegant Beef> I do sorta want to see about getting nim support in panda3D but ugh |
06:50:08 | leorize | text-based drawing come first :P |
06:50:12 | FromDiscord | <Elegant Beef> Im too daft to know where |
06:50:31 | FromDiscord | <Elegant Beef> I guess |
06:51:01 | silvernode | Yeah I will need something for the UI at some point but of course right now I am just seeing what works and what doesn't work. That's why I have everything in the experimental branch |
06:52:18 | silvernode | To get an idea of what I am trying to achieve, check out Trade Wars on a BBS. bbs.lunduke.com:23 is a place to play it. |
06:52:24 | FromDiscord | <Elegant Beef> What's the plan of the game anyway, just a bunch of basic text on screen? 😄 |
06:52:50 | * | actuallybatman joined #nim |
06:53:14 | silvernode | https://github.com/silvernode/space-nim/blob/master/ideas.md |
06:53:46 | silvernode | https://en.wikipedia.org/wiki/Trade_Wars |
06:54:11 | silvernode | Well I hate to have to leave but I am waiting in the parking lot at work and have to go clock in |
06:54:19 | FromDiscord | <Elegant Beef> well buh bye |
06:54:36 | silvernode | Thank you all for your kindness, hav a great day! |
06:56:21 | * | s4mu3lbk joined #nim |
06:59:07 | leorize | narimiran: wait you disabled travis? |
06:59:18 | * | silvernode quit (Ping timeout: 256 seconds) |
06:59:22 | narimiran | leorize: yes |
06:59:27 | FromDiscord | <Elegant Beef> Woah,woah it's 2020 you cant say that about travis |
06:59:27 | leorize | it builds the doc for nim-lang.github.io |
06:59:40 | leorize | have you got anything as a replacement? |
06:59:43 | narimiran | aw shit |
07:00:45 | leorize | you can trim travis.yml to just build the docs |
07:01:17 | leorize | basically ./koch runCI -> ./koch boot && ./koch docs |
07:01:28 | leorize | then remove the code for everything that's not linux |
07:01:44 | narimiran | leorize: can you send a PR? |
07:02:20 | leorize | I'm gonna head off now, so you do it :p |
07:26:51 | * | solitudesf joined #nim |
07:28:11 | * | PMunch joined #nim |
07:45:43 | * | s4mu3lbk quit (Ping timeout: 260 seconds) |
07:47:59 | * | dadada quit (Ping timeout: 268 seconds) |
07:53:32 | imogen | hi, I'm back! |
07:53:45 | imogen | I'm still having issues with the any type |
07:54:52 | PMunch | What's your issue with it? |
07:58:18 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Hey all, I'm still kinda new to Nim, and I'm using c2nim to create a wrapper for the libstrophe C library, however it appears Nim chokes on names with leading underscores. Unfortunately libstrophe uses leading underscores in several structs, leading to stuff like this: |
07:58:18 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> ```nim |
07:58:18 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> type |
07:58:19 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> xmpp_mem_t* = _xmpp_mem_t |
07:58:19 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> ``` |
07:58:22 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Which the compiler freaks out about (`Error: invalid token: _ (\95)`). Does anyone have a good idea on how I can work around this? |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:40 | PMunch | You can specify the name of the C field with {.importc: "_xmpp_mem_t".} |
08:05:08 | * | Vladar joined #nim |
08:05:09 | * | gmpreussner joined #nim |
08:05:16 | * | imogen quit (Quit: Konversation terminated!) |
08:09:54 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Like so? |
08:09:54 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> ```nim |
08:09:54 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> type |
08:09:54 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> xmpp_mem_t* {.importc: "_xmpp_mem_t".} = object |
08:09:55 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> ``` |
08:11:39 | PMunch | Kinda hard to tell without looking at the actual code, but maybe |
08:12:02 | PMunch | And please don't paste code into Discord, it causes a lot of spam when sent over to IRc |
08:12:15 | * | gmpreussner quit (Ping timeout: 260 seconds) |
08:12:16 | PMunch | We're working on a better bot that will fix it |
08:12:37 | PMunch | But in the meantime please try to avoid it and use a paste site instead |
08:12:53 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Ahh, my apologies |
08:13:06 | PMunch | No worries |
08:28:02 | * | paxis quit (Ping timeout: 256 seconds) |
08:35:23 | FromDiscord | <Varriount> @𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭 Your name is odd. I can't type it using my keyboard |
08:35:46 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Yeah it's some unicode fuckery, sorry lol |
08:35:58 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Let me tweak it for this server |
08:36:30 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Oh apparently I can't, this server isn't set up to allow you to change your name :/ |
08:39:34 | Zevv | Funny, I can't change my nick to 𝓩𝓮𝓿𝓿, not allowed |
08:41:31 | FromDiscord | <𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> I imagine the IRC server is more restrictive in what it allows? I haven't used IRC in many years, went from IRC to XMPP to Discord 😄 |
08:45:53 | FromDiscord | <Varriount> IRC can handle Unicode, depending on your client |
08:46:32 | FromDiscord | <Varriount> Zevv: How are you? I've gone from Gitter to discord now |
08:46:54 | FromDiscord | <Varriount> I'm also slightly drunk on exhaustion |
08:53:17 | * | floppydh joined #nim |
08:55:23 | Zevv | You should go from discord to bed then, I guess :) |
08:55:48 | * | sammich quit (Ping timeout: 256 seconds) |
08:55:58 | * | sammich joined #nim |
09:01:03 | * | leorize quit (Ping timeout: 240 seconds) |
09:03:17 | * | leorize joined #nim |
09:07:19 | * | chemist69 quit (*.net *.split) |
09:07:19 | * | blackbeard420 quit (*.net *.split) |
09:07:19 | * | FromGitter quit (*.net *.split) |
09:07:19 | * | gangstacat quit (*.net *.split) |
09:07:19 | * | noonien quit (*.net *.split) |
09:07:19 | * | d10n-work quit (*.net *.split) |
09:07:19 | * | r4vi quit (*.net *.split) |
09:07:19 | * | npgm quit (*.net *.split) |
09:07:20 | * | planetis[m] quit (*.net *.split) |
09:07:20 | * | lqdev[m] quit (*.net *.split) |
09:07:20 | * | Hotbees quit (*.net *.split) |
09:07:20 | * | CcxWrk quit (*.net *.split) |
09:07:21 | * | Cadey quit (*.net *.split) |
09:24:50 | * | gangstacat joined #nim |
09:28:45 | * | zahary joined #nim |
09:35:33 | * | alexander92 joined #nim |
09:42:29 | * | marmotini_ joined #nim |
09:43:19 | * | chemist69 joined #nim |
09:43:19 | * | blackbeard420 joined #nim |
09:43:19 | * | FromGitter joined #nim |
09:43:19 | * | d10n-work joined #nim |
09:43:19 | * | noonien joined #nim |
09:43:19 | * | npgm joined #nim |
09:43:19 | * | r4vi joined #nim |
09:43:19 | * | planetis[m] joined #nim |
09:43:19 | * | lqdev[m] joined #nim |
09:43:19 | * | Hotbees joined #nim |
09:43:19 | * | CcxWrk joined #nim |
09:43:19 | * | Cadey joined #nim |
09:43:58 | * | d10n-work quit (Max SendQ exceeded) |
09:45:29 | * | abm joined #nim |
09:47:42 | FromGitter | <gogolxdong> Any idea on preventing read-write data racing? ``len(a) == L` the length of the seq changed while iterating over it [AssertionError]` |
09:48:16 | * | d10n-work joined #nim |
09:48:53 | FromGitter | <gogolxdong> (https://files.gitter.im/nim-lang/Nim/wmSR/image.png) |
09:49:06 | FromGitter | <gogolxdong> much like this. |
09:50:18 | FromGitter | <gogolxdong> push to a multithreading channel |
09:51:49 | FromGitter | <gogolxdong> workers receive message from channel in a while true loop |
09:58:51 | FromDiscord | <Varriount> Use a lock or a queue |
10:08:03 | FromDiscord | <Rika> a mutex lock more precisely, no? |
10:09:48 | * | dwdv joined #nim |
10:10:09 | PMunch | Are there non-mutex locks? |
10:10:58 | FromDiscord | <Rika> yes, physical locks lol |
10:11:31 | PMunch | Haha, I guess |
10:33:20 | * | marmotini_ quit (Remote host closed the connection) |
10:33:56 | * | marmotini_ joined #nim |
10:35:35 | * | paxis joined #nim |
10:35:45 | FromDiscord | <clyybber> @𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭 oh yeah its not allowed, because otherwise one could really fuck with IRC users, since they don't get to see the discord user ID |
10:36:04 | FromDiscord | <clyybber> I can rename you to Benumbed if you want? |
10:38:03 | * | marmotini_ quit (Ping timeout: 240 seconds) |
10:40:48 | FromGitter | <alehander92> yeah please just use normal font |
10:40:58 | alexander92 | if not a problem |
10:41:01 | alexander92 | of course |
10:41:25 | FromDiscord | <Rika> once clyybber renames them |
10:49:32 | * | marmotini_ joined #nim |
10:54:16 | * | marmotini_ quit (Ping timeout: 255 seconds) |
10:56:25 | FromGitter | <nothratal> can someone give me a helping hand on tables in nim? I try the following: ⏎ ⏎ ```var awfs = initTable[string, seq[string]] ⏎ awfs["foo"] = @["FOO-123"] ⏎ ``` ⏎ ⏎ getting the following error message: ... [https://gitter.im/nim-lang/Nim?at=5e60dad92e398f46abdfd5c6] |
10:56:50 | narimiran | you're missing `()` at the end of the first line |
10:56:56 | narimiran | `initTable[string, seq[string]]()` |
10:58:33 | FromGitter | <nothratal> Ohh come on! -.- ⏎ I try it for an hour already |
10:59:00 | FromGitter | <nothratal> I tried seq[string], newSeq[string], @[string]... |
10:59:13 | FromGitter | <nothratal> but yeah, now it's working just fine |
10:59:16 | narimiran | next time, be quicker to come here and ask for help :) |
10:59:30 | FromGitter | <alehander92> in those cases you should try and comment some of the lines |
10:59:40 | FromGitter | <alehander92> to see quickly where the error comes from |
11:00:29 | FromGitter | <alehander92> as we programmers often wrongly assume what might be wrong (e.g. in this case the seq assignment vs the table one) |
11:00:44 | FromGitter | <nothratal> good idea, next time I'm directly asking here |
11:01:13 | FromGitter | <nothratal> I need a script automatically pasting code snippets with error messages on build :D |
11:01:22 | FromGitter | <alehander92> ah i am sorry, now i realize that the first line by itself works |
11:01:29 | narimiran | shit, i created a monster |
11:02:54 | FromGitter | <alehander92> i had an error with glibc / libm version running bin/nim on CI server today, i probably had an older binary, so just rm and rebuilding it seemed to work |
11:03:22 | FromGitter | <alehander92> you guys what projects are you working on these day |
11:06:50 | FromDiscord | <mratsim> A cryptographic library to rule them all and in the darkness bind them |
11:12:24 | PMunch | alehander92, better macros |
11:13:04 | FromDiscord | <clyybber> PMunch: You mean a better macros.nim? |
11:14:02 | PMunch | Well I'm creating a separate module so far |
11:14:35 | PMunch | The basic part is initialisers and accessors for all node types |
11:14:50 | PMunch | So no more [0][1][6][0][3] |
11:15:22 | PMunch | Then I might try to create a better quote and possibly a reverse-quote |
11:17:40 | FromDiscord | <clyybber> Cool, did you look at breeze? |
11:17:45 | FromDiscord | <clyybber> !repo breeze |
11:17:46 | disbot | https://github.com/alehander92/breeze -- 9breeze: 11a macro dsl for nim 15 37⭐ 2🍴 |
11:18:03 | FromDiscord | <clyybber> disruptek: Lol, this is for you: |
11:18:10 | FromDiscord | <clyybber> !repo silvernode/chill-script |
11:18:11 | disbot | https://github.com/silvernode/chill-script -- 9chill-script: 11Countdown to next bong hit 15 0⭐ 0🍴 |
11:18:16 | * | couven92 joined #nim |
11:18:45 | * | m4r35n357 joined #nim |
11:19:36 | PMunch | clyybber, yes I've seen that |
11:20:09 | Guest32153 | j |
11:20:11 | PMunch | But I fail to see how that is very different from nnk<Node>.newTree |
11:20:23 | FromDiscord | <clyybber> its not |
11:20:35 | PMunch | (and very similar to how I create the nodes in my system, although only with procedures) |
11:20:37 | FromDiscord | <clyybber> its just syntactic sugar |
11:20:57 | FromDiscord | <clyybber> PMunch: Cool, I look forward to seeing what you come up with |
11:21:44 | FromGitter | <alehander92> mratsim what about it? |
11:22:01 | FromGitter | <alehander92> oh do you have a readme! |
11:22:09 | FromGitter | <alehander92> (but please with a possitive motto :D) |
11:22:16 | FromGitter | <alehander92> PMunch i also want to see it |
11:22:23 | FromGitter | <alehander92> it would be great to have ir |
11:22:45 | alexander92 | a bit offtopic: error: initializer element is not constant NIM_CONST tyTuple__8XLMpCO6I9an9bCBZiyy77Lg TM__oayp9apKIkKT4gAk6de9btnw_147 = {TM__oayp9apKIkKT4gAk6de9btnw_62, |
11:22:53 | alexander92 | have you guys have had a similar error before |
11:23:43 | PMunch | I have, but that was when I was messing about with codegenDecl |
11:29:32 | * | lritter joined #nim |
11:30:21 | FromDiscord | <Rika> looks like an internal error to me |
11:31:37 | alexander92 | yeah but i think its my bug |
11:32:45 | * | muffindrake quit (Quit: muffindrake) |
11:36:34 | Araq | forum is down? dom96 are doing a deploy? |
11:39:04 | FromDiscord | <mratsim> @alehander92 (why not 42 anymore?): https://github.com/mratsim/constantine |
11:40:49 | FromDiscord | <mratsim> Not too sure if I want to go there but I might have to write my own compiler because GCC is too dumb to produce good code for bigint ... https://github.com/mratsim/bignum/blob/master/add_carry.nim |
11:42:41 | FromGitter | <alehander92> which architectures/platforms do you plan to support |
11:43:58 | * | s4mu3lbk joined #nim |
11:44:10 | * | muffindrake joined #nim |
11:51:36 | FromDiscord | <mratsim> it would be generic, but at least 32-bit for now |
11:51:51 | FromDiscord | <mratsim> I'll see for 8-bit and 16-bit arch later |
11:53:29 | * | MarderIII joined #nim |
11:53:54 | * | nsf quit (Quit: WeeChat 2.7) |
11:54:12 | FromDiscord | <mratsim> if you were talking about the compiler, it would be something very simple actually: like that https://github.com/mratsim/bignum/blob/6775057d192401e9d06b1ef197ee3f7b3bb51153/macro_add_carry.nim#L15-L49 |
11:54:33 | FromDiscord | <mratsim> to support multiprecision addition, substraction and multiplication with optimized assembly |
11:55:56 | FromDiscord | <mratsim> my main issue is that Clang doesn't want to compile 8+%[myArray] (8 byte offset from the start of a memory location) |
11:56:53 | FromGitter | <alehander92> why not open an issue with the clang guys |
11:57:00 | * | noonien quit (Quit: Connection closed for inactivity) |
11:57:42 | FromDiscord | <mratsim> 1. I'm not sure what the syntax is, the documentation is very lacking on extended assembly |
11:58:33 | FromDiscord | <mratsim> 2. I want something that works in the near future |
11:58:46 | FromDiscord | <mratsim> not sure what their release schedule is |
11:59:51 | FromDiscord | <mratsim> 3. That was just an experiments over the weekend to evaluate implementation candidate |
12:00:40 | FromDiscord | <mratsim> the library is too slow right now and some cryptographic computations (zero-knowledge proofs) currently require 16+ cores CPU to have decent throughput: https://medium.com/loopring-protocol/zksnark-prover-optimizations-3e9a3e5578c0 |
12:05:39 | * | s4mu3lbk quit (Ping timeout: 260 seconds) |
12:09:25 | PMunch | Can't I use quote in a template? |
12:10:08 | FromDiscord | <Rika> wdym? |
12:10:15 | FromDiscord | <Rika> quote syntax? yes |
12:10:30 | FromDiscord | <Rika> \`a\` = \`b\` |
12:10:54 | PMunch | I have a thing I repeat in a macro, and I wanted to put it in a template instead |
12:11:33 | PMunch | Hmm, that almost worked.. |
12:12:06 | PMunch | Apparently only the last ` must have \ prepended :S |
12:18:25 | * | alexander92 quit (Ping timeout: 255 seconds) |
12:25:46 | FromGitter | <gogolxdong> Is it easier to use parallel with spawn? |
12:26:04 | * | NimBot joined #nim |
12:27:07 | FromDiscord | <Rika> PMunch, oh god does the bridge show the backslashes???? |
12:27:36 | PMunch | Yes |
12:27:57 | PMunch | https://irclogs.nim-lang.org/05-03-2020.html#12:10:30 |
12:28:01 | PMunch | That's what it looks like |
12:28:34 | FromDiscord | <Rika> disregard all of them then lmaoooo |
12:29:20 | PMunch | Well, this actually worked: http://ix.io/2drX/nim |
12:29:46 | FromDiscord | <Rika> weird |
12:29:51 | FromDiscord | <Rika> maybe a bug? |
12:29:55 | PMunch | Without those backslashes the output would be the literal within the `` |
12:30:15 | PMunch | Well, I think it is the template escaping that's figthing with the quote escaping |
12:30:24 | PMunch | And somehow this tricks it into working :P |
12:30:32 | PMunch | Most definitely undocumented behaviour :P |
12:30:40 | FromGitter | <gogolxdong> Is it a reliable multithreading implementation? |
12:43:52 | * | Hideki_ joined #nim |
12:44:36 | * | narimiran quit (Ping timeout: 268 seconds) |
12:44:58 | * | MarderIII quit (Ping timeout: 255 seconds) |
13:06:35 | * | marmotini_ joined #nim |
13:07:12 | FromGitter | <melMass> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e60f97f4eefc06dcf377430] |
13:08:29 | FromDiscord | <Rika> what do you mean inplace |
13:09:04 | FromGitter | <melMass> The compiler discards mypath on the last line as it's not assigning to mypath but just returning a value ;( |
13:09:35 | FromDiscord | <Rika> change it to proc `/=`*(this:var Path,b:Path) = this = joinPath(this, b) |
13:09:58 | FromGitter | <melMass> !!! |
13:10:01 | FromDiscord | <Rika> then you cant use let anymore |
13:10:18 | FromGitter | <melMass> Thanks where is the `var` in procedures arguments documented please |
13:10:45 | FromDiscord | <Rika> somewhere in the manual im pretty sure |
13:11:11 | FromGitter | <Vindaar> https://nim-lang.github.io/Nim/tut1.html#procedures-parameters |
13:11:14 | FromGitter | <melMass> Thanks I'll look for it now that I understand what it does :) |
13:11:23 | FromGitter | <melMass> <3 |
13:11:36 | FromGitter | <Vindaar> https://nim-lang.github.io/Nim/manual.html#procedures-var-parameters |
13:12:45 | FromGitter | <melMass> Thanks for the links @Vindaar, pretty obvious sorry |
13:12:55 | FromGitter | <Vindaar> no worries! :) |
13:13:23 | * | theelous3 joined #nim |
13:13:26 | PMunch | Hmm, can't I access the sons of a NimNode directly? |
13:14:42 | lqdev[m] | PMunch: node[x] |
13:14:45 | lqdev[m] | doesn't work? |
13:14:45 | FromDiscord | <Rika> wdym |
13:14:46 | FromDiscord | <Rika> yeah |
13:15:09 | PMunch | Yeah I know that works, but what I want to do is "node.sons = newSeq[NimNode](5)" |
13:15:18 | lqdev[m] | ah |
13:15:24 | PMunch | And then do "node[1] = somenode" |
13:15:26 | * | alexander92 joined #nim |
13:15:32 | lqdev[m] | you have to create a new node |
13:15:41 | lqdev[m] | and add the sons one by one |
13:15:41 | Araq | use ast.shallowCopy instead (terrible name I know) |
13:17:01 | PMunch | Araq, huh? |
13:18:37 | * | marmotini_ quit (Remote host closed the connection) |
13:18:47 | PMunch | Hmm, I've got this output now: http://ix.io/2ds9/nim but it complains that result[0] cannot be assigned to? |
13:19:13 | * | marmotini_ joined #nim |
13:20:39 | * | clemens3 quit (Quit: rebooting) |
13:22:43 | PMunch | Is result being captured somehow? |
13:22:53 | PMunch | fg |
13:22:55 | PMunch | woops |
13:23:08 | * | endragor quit (Remote host closed the connection) |
13:23:21 | * | endragor joined #nim |
13:24:04 | * | marmotini_ quit (Ping timeout: 268 seconds) |
13:24:27 | * | clemens3 joined #nim |
13:27:33 | * | Hideki_ quit (Remote host closed the connection) |
13:28:20 | * | Hideki_ joined #nim |
13:31:03 | PMunch | Ugh, why doesn't this work? |
13:31:42 | PMunch | It just refuses to assign to result[0] through the field macro for some weird reason.. |
13:32:40 | * | Hideki_ quit (Ping timeout: 258 seconds) |
13:34:50 | * | marmotini_ joined #nim |
13:37:43 | FromDiscord | <mratsim> result + indexing doesn't work well in macro |
13:37:51 | FromDiscord | <mratsim> or result + tuple access |
13:38:23 | FromGitter | <Vindaar> if you directly access the `result` it works fine, no? |
13:38:42 | FromDiscord | <mratsim> maybe related to: https://github.com/nim-lang/Nim/issues/11637 |
13:38:43 | disbot | ➥ {.compileTime.} var ref are not updated properly for implicit result |
13:39:23 | * | marmotini_ quit (Ping timeout: 260 seconds) |
13:39:50 | PMunch | Hmm, would it help if I build the NimNode in a different var and then returned it? |
13:39:56 | FromDiscord | <mratsim> yes |
13:40:09 | FromDiscord | <mratsim> that's my workaround |
13:40:24 | FromDiscord | <mratsim> well, it was @vindaar who found it |
13:40:56 | * | Hideki_ joined #nim |
13:40:56 | * | Kaivo joined #nim |
13:41:49 | PMunch | res[0] cannot be assigned to |
13:41:54 | PMunch | Turns out that wasn't the issue |
13:42:52 | PMunch | What I have: http://ix.io/2dsi/nim |
13:44:14 | FromGitter | <Vindaar> I was? Only vaguely remember something, haha |
13:44:16 | PMunch | https://play.nim-lang.org/#ix=2dsj |
13:49:18 | * | sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in) |
13:52:04 | PMunch | Meh, ended up with this, not as pretty or safe, but it works: http://ix.io/2dso/nim |
13:52:07 | PMunch | At least for now |
13:54:09 | * | endragor quit (Remote host closed the connection) |
13:55:16 | * | MarderIII joined #nim |
14:03:05 | FromGitter | <alehander92> pmunch great, but can you add some comments |
14:03:11 | FromGitter | <alehander92> it seems a bit hard to understand what happens |
14:03:24 | FromGitter | <alehander92> to me in this command example |
14:04:13 | PMunch | Oh yeah, this is very early code :P |
14:04:23 | PMunch | Not really meant to be read by anyone else than me :P |
14:04:47 | Araq | the best kind of code |
14:06:08 | * | marmotini_ joined #nim |
14:07:20 | * | dadada joined #nim |
14:07:44 | * | dadada is now known as Guest79999 |
14:08:22 | FromGitter | <alehander92> praise God, my issue is finally fixed |
14:08:36 | FromGitter | <alehander92> now i can go into final CI mode |
14:08:49 | FromGitter | <alehander92> pmunch yeah no problem, just i wonder if thats pattern matching |
14:08:56 | * | nsf joined #nim |
14:09:35 | PMunch | alehander92, oh no, this is just to try and automatically generate the generator and getters/setters for the NimNode kinds |
14:09:38 | FromGitter | <alehander92> hm, @bobeff helped me realize i need newer gcc for some of my nim codegen, it seems gcc 7.x was complaining about const field initialization |
14:09:42 | PMunch | I got tired of doing them by hand |
14:09:48 | FromGitter | <alehander92> is there a min gcc version needed |
14:10:01 | FromGitter | <alehander92> PMunch oh nice |
14:10:13 | PMunch | And I realised I would have to write a automatically generated test case to ensure that all the names matched up and such, no fun |
14:11:29 | FromGitter | <Vindaar> PMunch: this works: http://ix.io/2dsw/nim |
14:11:51 | * | clyybber joined #nim |
14:11:57 | FromGitter | <Vindaar> see the couple of `NOTE` comments |
14:14:19 | PMunch | What? That won't work |
14:14:44 | PMunch | The field templates are used to replace the "field" in the setter body |
14:14:59 | FromGitter | <Vindaar> then I misunderstood that macro :D |
14:15:23 | PMunch | But I can see how newLit would mess things up, but it isn't complaining about a [] not being defined for that value |
14:16:19 | PMunch | The macro spit out something like this: http://ix.io/2dsx/nim |
14:16:46 | PMunch | Notice how the field templates are used to set what `field` means for each of the setter bodies |
14:16:55 | * | Hideki_ quit (Remote host closed the connection) |
14:17:39 | alexander92 | Araq |
14:17:42 | * | Hideki_ joined #nim |
14:17:51 | clyybber | Araq: Sup, why do we only do it for objects here: https://github.com/nim-lang/Nim/pull/13589/files#diff-750ffc8fb636a0b3ddd159b478017510R1302 ? |
14:17:52 | disbot | ➥ fixes #5170 |
14:17:57 | alexander92 | we cant capture result because it can be returned on the stack? and disappear? |
14:19:07 | alexander92 | or is it because it's basically equivalent to `var res` argument |
14:19:58 | Araq | iirc the reason was "omg too hard to implement" |
14:20:12 | alexander92 | :D |
14:20:24 | Araq | clyybber, because other problems haven't been reported |
14:20:52 | alexander92 | but why are they special for closures, isnt it just a matter of pointing to the same thing inside the closure env-s |
14:21:04 | Araq | so ... my cycle collector is getting into good shape |
14:21:35 | PMunch | Araq, ooh |
14:21:54 | FromGitter | <Vindaar> @PMunch sorry, I don't get it. What does the template provide over just inserting the correct `result` index? |
14:22:16 | clyybber | Araq: Ah alright. I'll test it with tuple then :p |
14:22:39 | * | Hideki_ quit (Ping timeout: 268 seconds) |
14:23:06 | PMunch | Vindaar, well it saves you from traversing the entire NimNode tree (which isn't perfect, what if there is a call to a macro within the setter body?) and replacing `field` with `result[whatever]`. |
14:23:37 | PMunch | And the reason I wanted it was in order to be able to do this: name[0](NimNode): field = asIdent(name) |
14:24:09 | PMunch | And field would automatically know that it was result[0], so I would be sure to use the correct indices |
14:24:27 | * | marmotini_ quit (Remote host closed the connection) |
14:25:00 | * | marmotini_ joined #nim |
14:25:46 | FromGitter | <Vindaar> I think I'd have to see a more complex example of how that macro is supposed to be used to see the real problem. As far as I see it there's only `result`, its index given by hand and the RHS we assign to `field` |
14:28:53 | PMunch | Hmm, I guess I could just create a variable named `cur` or something.. |
14:28:57 | PMunch | Would be way easier |
14:29:48 | * | marmotini_ quit (Ping timeout: 256 seconds) |
14:30:10 | FromGitter | <zetashift> You know it's gonna be a productive day when I see a bunch of github notifications of mratsim working on Arraymancer ;P |
14:32:23 | * | dddddd joined #nim |
14:41:12 | * | marmotini_ joined #nim |
14:41:52 | FromGitter | <dumjyl> PMunch: Consider that not all node kinds should be constructed (or exposed). IMO a new high-level macros module does not expose NimNode with its associated gotchas and legacies among other things. |
14:45:14 | PMunch | dumjyl, any examples? |
14:45:42 | Araq | muhaha |
14:47:19 | alexander92 | i think an "escape hatch" is always needed even in such a hypothetical moudle |
14:47:21 | alexander92 | module* |
14:47:50 | PMunch | Yeah my idea was to expose everything |
14:48:09 | alexander92 | nice |
14:49:52 | clyybber | Araq: Does that laughing imply your cycle collector is working ?? |
14:53:42 | Araq | it means I got into the "Noise" for thavlak.nim |
14:54:27 | PMunch | Sweet, this works pretty well: http://ix.io/2dsG/nim |
14:54:36 | PMunch | Now back to writing definitions :( |
14:54:41 | * | Hideki_ joined #nim |
14:54:51 | Araq | 0.47s vs 0.44s |
14:55:01 | FromGitter | <dumjyl> Off the top of my head: `nnkConstDef` and `nnkIdentDef`, `nnkStmtList` and `nnkStmtListExpr`, `nnkFastAsgn`, probably anything with hidden in the name. |
14:55:19 | * | adalricus joined #nim |
14:55:29 | Araq | but it's an unfair comparison as without the cycle collector the memory isn't freed so of course it's cheaper |
14:56:17 | PMunch | What, how would you generate those nodes then dumjyl? |
14:56:44 | Araq | and now at 0.45s |
14:56:57 | Araq | the only question is what conclusions to draw from this :P |
14:57:10 | clyybber | Araq: Nice! |
14:57:33 | clyybber | Araq: What did you mean with the cycle collector being undeterministic though? |
14:57:44 | clyybber | AFAICT it doesn't use randomness does it? |
14:58:10 | * | Hideki_ quit (Remote host closed the connection) |
14:58:26 | * | Hideki_ joined #nim |
15:00:41 | FromGitter | <zetashift> Say I have a `type Vector = object` and I'm defining a `*=` operator for it where it multiplies another vector with itself. Do I use a `method` or use a proc and giving a `v1: var Vec3`? |
15:00:50 | clyybber | proc |
15:01:02 | clyybber | with the first argument being a v1: var Vec3 |
15:01:04 | FromGitter | <zetashift> sick thanks for the quick reply haha |
15:01:12 | clyybber | np |
15:02:44 | * | PMunch quit (Quit: Leaving) |
15:02:58 | * | theelous3_ joined #nim |
15:04:27 | * | Hideki_ quit (Remote host closed the connection) |
15:05:19 | * | Hideki_ joined #nim |
15:05:51 | FromDiscord | <Rika> god damn it i keep on doing nim-only things on python like editing an indexed string |
15:07:51 | Araq | clyybber, not randomness but destruction is not tied to a scope/proc then |
15:10:05 | * | Hideki_ quit (Ping timeout: 265 seconds) |
15:10:10 | clyybber | Araq: Ah, yeah. That seems fine to me. Its still tied to it as long as its not cyclic right? |
15:10:19 | Araq | yes |
15:10:22 | * | adalricus quit (Quit: ERC (IRC client for Emacs 26.3)) |
15:10:40 | clyybber | And its still only triggered on scope/proc exit? |
15:11:17 | clyybber | Araq: Right? |
15:11:21 | Araq | sure |
15:11:24 | clyybber | Nice |
15:11:31 | clyybber | Then its just about perfect IMO |
15:11:34 | clyybber | :D |
15:11:39 | Araq | but it's super confusing |
15:12:39 | clyybber | Araq: for you as the one who had to implement it, or the user who just sees the results? |
15:13:26 | Araq | for me |
15:13:34 | clyybber | then its fine haha :D |
15:16:48 | * | adalricus joined #nim |
15:20:38 | Araq | no it sucks |
15:21:35 | Araq | I think I understand now |
15:23:07 | * | couven92 quit (Read error: Connection reset by peer) |
15:23:32 | * | couven92 joined #nim |
15:23:43 | * | MarderIII quit (Quit: Leaving) |
15:23:50 | clyybber | Araq: Puuuush it :D I wonna see haha |
15:25:44 | Araq | I'll stream about it soon |
15:26:24 | clyybber | nice |
15:26:49 | clyybber | I'll probably miss the stream :/ |
15:26:55 | clyybber | its recorded though right? |
15:32:29 | * | marmotini_ quit (Remote host closed the connection) |
15:32:45 | * | marmotini_ joined #nim |
15:32:52 | Araq | sure |
15:34:30 | clyybber | nice, thanks |
15:35:51 | * | Hideki_ joined #nim |
15:39:11 | FromDiscord | <Rika> can anyone tell me every function in nim that can do evaluations of math |
15:39:32 | FromGitter | <melMass> @Araq where do you stream ? |
15:41:42 | lqdev[m] | @Rika wdym |
15:42:58 | * | solitudesf- joined #nim |
15:43:52 | * | jholland__ joined #nim |
15:44:09 | clyybber | Rika: You mean like something like a math command? |
15:44:22 | clyybber | That you pass a mathematical expression as a string to? |
15:45:09 | FromDiscord | <Rika> yes |
15:46:53 | clyybber | Havent seen one yet |
15:47:32 | clyybber | You could try running it as nimsript, assuming you are working on an repl anyways |
15:47:39 | FromDiscord | <Rika> other than mathexpr as a package? |
15:47:46 | FromGitter | <Vindaar> @Rika: there's https://github.com/Yardanico/nim-mathexpr. Never tried it though |
15:48:10 | FromGitter | <Vindaar> ah, you know that already? |
15:48:18 | FromDiscord | <Rika> yeah, im looking for anything on stdlib because im trying to make a programming challenge test case that checks for any of those functions imported |
15:48:27 | clyybber | eh nope |
15:48:34 | FromDiscord | <Rika> ~~since packages cant be imported its fine~~ |
15:48:35 | clyybber | theres nothing like that in the stdlib afaik |
15:48:43 | FromDiscord | <Rika> hmm okay |
15:49:01 | clyybber | and doesn't belong there IMO |
15:49:25 | clyybber | stdlib should be a foundation or something thats needed or convinient very very often |
15:56:47 | * | Hideki_ quit (Remote host closed the connection) |
15:57:31 | * | Hideki_ joined #nim |
15:58:43 | * | solitudesf- quit (Quit: Leaving) |
16:01:50 | FromDiscord | <Rika> is there any way for a user to use a function w/o writing down the function name itself. same for imports |
16:02:08 | clyybber | no |
16:02:10 | * | Hideki_ quit (Ping timeout: 258 seconds) |
16:02:22 | clyybber | hmm, actually |
16:02:28 | clyybber | if you consider a converter a function |
16:02:30 | clyybber | then yes |
16:03:19 | FromDiscord | <Rika> oh, sorry, using + defining a function for function, only using for imports |
16:03:21 | FromDiscord | <Rika> okay |
16:03:24 | FromDiscord | <Rika> so that means no? |
16:03:29 | FromDiscord | <Rika> wait macros wtf aaa |
16:03:52 | FromDiscord | <Rika> okay plan 2 how do i detect if a module is imported after macros compilation and inlining aaaa |
16:04:03 | * | marmotini_ quit (Remote host closed the connection) |
16:04:17 | Araq | rethink your design |
16:04:38 | * | marmotini_ joined #nim |
16:05:02 | reversem3 | Still haivng issues with choosnim or osx , if I want to update nim should I just rebuild ? |
16:05:06 | FromDiscord | <Rika> its not mine xd, its me trying to defeat a person trying to cheat their way to finishing a programming challenge easily |
16:05:16 | FromDiscord | <Rika> reversem3, what issues |
16:05:29 | * | reversem3 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/WqfZyeSxUDFbnuelQubhOlQs > |
16:05:59 | * | clyybber quit (Quit: WeeChat 2.7.1) |
16:07:11 | FromDiscord | <Rika> i uh |
16:07:13 | FromDiscord | <Rika> dont see the issues what |
16:09:03 | * | marmotini_ quit (Ping timeout: 265 seconds) |
16:10:29 | reversem3 | I'm saying instead of using choosenim to update nim compiler should I just rebuild the source ? |
16:10:54 | leorize | you can do that |
16:11:03 | reversem3 | or is 1.1.1 the newest release anyway |
16:11:06 | FromGitter | <zetashift> Choosenim is the recommended way |
16:11:17 | leorize | 1.1.1 is Nim's devel version :P |
16:11:23 | reversem3 | right but right now its broken on osx |
16:11:23 | leorize | until 1.2 is released it will be 1.1.1 |
16:11:27 | FromGitter | <zetashift> I do recall devel being a version number like that |
16:11:51 | FromGitter | <zetashift> You mean that 1.1.1. aka the devel version is broken on OSX? |
16:12:05 | FromGitter | <zetashift> Just get the latest stable version with `choosenim stable`? |
16:12:07 | reversem3 | no choosenim choosenim-init: Downloading choosenim-0.5.1_macosx_amd64 |
16:12:07 | reversem3 | SIGBUS: Illegal storage access. (Attempt to read from nil?) |
16:12:27 | FromDiscord | <Rika> maybe choosenim is broken on macos on latest devel? |
16:12:35 | leorize | shashlick: ^ |
16:12:37 | reversem3 | the code is in #head but not released yet |
16:12:57 | leorize | if you already have the compiler you can build choosenim pretty easily |
16:13:54 | reversem3 | hmm maybe I should , but I already compiled nimc git version , I don't want to have multiple versions of nim on here |
16:13:57 | reversem3 | so virtenv and I'm not chroot |
16:14:02 | FromGitter | <zetashift> reversem3: https://github.com/dom96/choosenim/issues/122#issuecomment-580862084 |
16:14:04 | disbot | ➥ SIGBUS: Illegal storage access. (Attempt to read from nil?) on macOS ; snippet at 12https://play.nim-lang.org/#ix=27Z9 |
16:14:23 | Araq | reversem3, if you don't want to have multiple Nim version why do you use 'choosenim'? o.O |
16:14:35 | reversem3 | yep I know , hasn't been released yet |
16:14:38 | Araq | that's the only point of choosenim |
16:15:04 | reversem3 | hmm |
16:15:07 | FromGitter | <zetashift> ah that's the shame |
16:15:29 | FromGitter | <zetashift> you could just build from source, should be quick |
16:15:43 | reversem3 | yeah I think I should |
16:16:04 | Araq | yeah follow our github instructions |
16:16:13 | reversem3 | how will that affect version 1.1.1 installed now though ? |
16:16:30 | reversem3 | should I remove it first ? |
16:16:34 | Araq | yeah |
16:16:43 | Araq | remove it all, choosenim, nim, nimble |
16:17:58 | reversem3 | ok remove it all then build choosenim ? |
16:18:00 | * | marmotini_ joined #nim |
16:18:37 | disruptek | uhhhh |
16:18:47 | FromGitter | <zetashift> nah just remove it all and build Nim from source |
16:19:19 | reversem3 | umm I already have nim built from source |
16:19:33 | FromGitter | <zetashift> https://github.com/nim-lang/Nim#compiling |
16:19:37 | * | reversem3 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/KFZVaqeWRqOSzPumeDsHOjrB > |
16:19:40 | FromGitter | <zetashift> then you're good to go! |
16:20:19 | reversem3 | now nimsuggest is built with nimc correct ? |
16:20:31 | leorize | yep |
16:20:41 | leorize | or just run ./koch toolsNoNimble |
16:20:44 | Araq | then run 'koch tools' |
16:21:27 | reversem3 | even though I have already built nim ? |
16:21:37 | reversem3 | you guys are confiusing me lol , |
16:21:45 | leorize | well koch is Nim's build system :P |
16:21:56 | leorize | it will use the nim you built to build the tools |
16:21:57 | reversem3 | I already have nim built on this machine using laterst release 1.1.1 |
16:23:01 | reversem3 | ok |
16:23:06 | FromGitter | <zetashift> that's good, so you know have the compiler you want the tools that come with the compiler too, like nimsuggest. You get those by running koch tools |
16:23:39 | leorize | btw 1.1.1 is not the latest release |
16:23:45 | leorize | it's the latest development version |
16:23:52 | leorize | the latest release is 1.0.6 iirc |
16:24:08 | reversem3 | for stable you mean right ? |
16:24:12 | disruptek | i thought choosenim 0.6.0 was out? no? |
16:24:35 | disruptek | if you built nim with `sh build_all.sh` then you are good to go with all the tools, etc. |
16:24:37 | reversem3 | I just tried the newset one I believe |
16:24:47 | FromDiscord | <Rika> disruptek no its not |
16:24:48 | FromGitter | <zetashift> reversem3 yes the latest stable release is 1.0.6 and you have the latest devel |
16:25:31 | FromGitter | <zetashift> 1) 5.1 is the latest choosenim release |
16:26:17 | reversem3 | so far the latest devel has been good |
16:26:34 | * | Guest32153 quit (Quit: WeeChat 2.3) |
16:27:58 | disruptek | i think the bot should report release versions when it talks about packages. |
16:28:41 | disruptek | disbot: make it so. |
16:28:42 | disbot | on it. 👍 |
16:31:02 | * | marmotini_ quit (Remote host closed the connection) |
16:31:37 | * | marmotini_ joined #nim |
16:33:42 | * | Hideki_ joined #nim |
16:34:09 | * | Guest79999 is now known as dadada |
16:35:00 | dadada | is there a particular reason why using the range operator in reverse/(for counting down) isn't supported? i.e. like this |
16:35:03 | dadada | for i in 10..0: echo $i |
16:35:26 | FromDiscord | <Recruit_main70007> I thought it was |
16:35:35 | FromDiscord | <Rika> its not |
16:35:45 | Zevv | good question, I wonder about that a thousand times as well |
16:35:47 | dadada | well, at least on playground it's not working |
16:36:02 | FromDiscord | <Recruit_main70007> Hmmm I swear there was something similar in the wiki |
16:36:07 | FromDiscord | <Rika> im sure its not |
16:36:16 | * | marmotini_ quit (Ping timeout: 255 seconds) |
16:36:39 | dadada | btw. I'm fascinated how quickly this room answers questions, big thumbs up to all of you! |
16:36:57 | * | marmotini_ joined #nim |
16:37:04 | disruptek | this channel is piped directly into my brain. it has its pros and cons. |
16:37:52 | Araq | it's because it makes no sense |
16:38:09 | FromDiscord | <Kiloneie> Is 1.0.6 compatible with 1.0.0 code ? |
16:38:14 | Araq | for i in x..y # iteration order depends on runtime values?! |
16:38:29 | Zevv | sure |
16:38:37 | FromGitter | <zetashift> @Kiloneie they should be no major breaking changes |
16:39:00 | Araq | never wanted to have this "feature" in my entire life, ideally the iteration order is static |
16:40:05 | FromGitter | <zetashift> From the tutorial `Since counting up occurs so often in programs, Nim also has a .. iterator that does the same:` maybe counting down occurs less often? |
16:40:51 | reversem3 | Araq: When do you know when to use pointers ? Are you guessing or is there a way to figure out when to use them and when not to use them? |
16:41:25 | FromDiscord | <Kiloneie> Okay so if i were to update video description on all my videos that it works from 1.0.0 to 1.0.6(it's simple code) i shouldn't be wrong right ? Or should i test everything ? Also what do you use for multiple versions of Nim to switch ? |
16:41:49 | disruptek | ~choosenim |
16:41:50 | disbot | choosenim: 11https://github.com/dom96/choosenim/releases/tag/v0.5.1 -- disruptek |
16:42:11 | Zevv | reversem3: you mean pointers or refs? |
16:42:13 | disruptek | i don't recommend it, but many others do. |
16:42:43 | reversem3 | I mean for C language |
16:42:50 | disruptek | pointers. |
16:42:50 | FromDiscord | <Kiloneie> Okay, i will have a look, gotta refresh my memory. |
16:43:12 | disruptek | refs are like "managed pointers" in some other languages. |
16:43:15 | * | Hideki_ quit (Ping timeout: 268 seconds) |
16:43:20 | Araq | reversem3, don't use 'ptr' if you can avoid it. same for 'ref' |
16:43:41 | reversem3 | I'm going back and fourth between C and nim to learn more |
16:43:52 | reversem3 | in C language not nim |
16:43:53 | reversem3 | I use ref objects in nim |
16:44:03 | reversem3 | brb |
16:44:18 | disruptek | Araq: what are you streaming and when? |
16:44:57 | Araq | wanted to stream about my cycle collector but it sucks |
16:45:21 | disruptek | walk us through it. you may learn something. |
16:45:36 | Araq | it's still the wrong design. Now I have a better design but I doubt I can stream how to implement it |
16:46:27 | disruptek | it's not so much about the impl, i think. more about the teaching. |
16:46:44 | FromDiscord | <mratsim> If you like GCs I have very annoying finalizer tracebacks to share 😉 |
16:47:40 | Araq | disruptek, well I can teach you how to be confused, vague and incompetent |
16:47:54 | disruptek | i'm already pro at that. |
16:49:04 | * | couven92 quit (Read error: Connection reset by peer) |
16:49:32 | * | zyklon quit (Ping timeout: 256 seconds) |
16:49:32 | * | couven92 joined #nim |
16:49:57 | FromDiscord | <mratsim> like does "[GCASSERT] decRef: waZctDecRefTraceback" indicate that I should abandon all hope? |
16:50:19 | Araq | mratsim: try 'koch valgrind' |
16:50:25 | disruptek | for my it usually indicates that i'm lost. |
16:52:09 | FromDiscord | <mratsim> with GCASSERT the traceback points to nim-1.0.6/lib/system/gc.nim(439) newObj |
16:52:09 | FromDiscord | <mratsim> And without it's a SIGSEGV in nim-1.0.6/lib/system/gc_common.nim(420) prepareDealloc after nim-1.0.6/lib/system/gc.nim(439) newObj |
16:52:52 | FromDiscord | <mratsim> koch valgrind is not documented |
16:53:01 | FromDiscord | <mratsim> does it work like koch temp c? |
16:53:05 | FromDiscord | <mratsim> koch valgrind c? |
16:53:39 | Araq | don't remember but if you read its source code, it calls valgrind for you with a Nim GC specific supression file |
16:55:12 | * | Zevv quit (Ping timeout: 256 seconds) |
16:55:20 | * | Zevv joined #nim |
16:55:20 | * | Zevv quit (Changing host) |
16:55:20 | * | Zevv joined #nim |
16:55:27 | FromDiscord | <mratsim> the output is worse: |
16:55:27 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/685168611253551104/unknown.png |
16:56:37 | * | uvegbot joined #nim |
16:56:51 | Araq | also compile with --debuginfo -d:noSignalHandler |
16:57:14 | dadada | Araq: I thought of the range operator as fromNumber..toNumber , for i in (-12)..(-8): echo $(i * -1) works as expected, this came to my mind when I was looking at this example code https://exercism.io/tracks/nim/exercises/reverse-string/solutions/04ae811f2aaf4d9db9acaf4ef9a792e1 ... this looks more complicated then necessary for a simple thing like reversing a string with for i in s.high..0: result &= s[i] |
16:57:20 | dadada | ... that example code would be much more intuitive in my opinion... of course you could also use countdown(), but I think the range operator is nicer, is it possible to override the range operator? |
16:57:50 | alexander92 | but dadada if you override the `..` operator |
16:58:05 | alexander92 | then other users will have no idea about this new behavior |
16:58:20 | Araq | dadada, you could introduce a `..-` range operator |
16:58:25 | dadada | alexander92: well, it would support the old behaviour, too, nothing changes for the usual code |
16:58:27 | alexander92 | thats why you should be very careful about the way you override such default ops |
16:58:47 | FromDiscord | <mratsim> same "FAILURE" :/ |
16:58:49 | alexander92 | dadada thats just not true: i'd expect that a .. b where a > b does 0 iterations |
16:58:53 | alexander92 | but it would do more |
16:59:05 | Araq | mratsim: shouldn't valgrind produce an error? |
16:59:13 | alexander92 | indeed, if you do that, do it with a new operator |
16:59:35 | FromDiscord | <mratsim> ah should I run it under valgrind then or is it called automatically by koch? |
16:59:50 | alexander92 | dadada also you have to think that some algorithms might assume that `..` is `upto` indeed |
17:00:09 | FromDiscord | <mratsim> answering myself, I shoudl run it |
17:00:10 | alexander92 | so they might already *depend* on the fact it does 0 iterations for a .. <a |
17:00:14 | Araq | koch calls it for you but you're better off calling it yourself |
17:00:15 | alexander92 | a .. b (b < a ) * |
17:00:26 | dadada | alexander92: alexander92: fair point! |
17:02:07 | FromDiscord | <mratsim> Valgrind doesn't handle AVX512 and quit early :/ but there were some GC warnings |
17:02:07 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/685170290673582135/unknown.png |
17:02:36 | * | solitudesf quit (Remote host closed the connection) |
17:02:40 | alexander92 | dadada otherwise it makes sense to me maybe as well, but the existing op is already known i think |
17:03:41 | disruptek | ..- almost sounds useful. |
17:03:45 | dadada | alexander92: the biggest issue is indeed that old code may rely on 10..0 not iterating at all |
17:04:38 | FromGitter | <zetashift> Say I have a `func`*`(vec: Vec3, t :float): Vec3 = ` function that multiplies a vector. When I use it it seems I always have to give it like `v * t` and I get a type error with `t * v` anyway around this? |
17:04:44 | FromGitter | <zetashift> yikes formatting |
17:04:51 | * | narimiran joined #nim |
17:05:28 | FromGitter | <zetashift> I can call it with v * t and not with t * v is what I mean |
17:06:22 | Araq | mratsim: these warnings are what the supression file should have prevented, they are false positives |
17:06:57 | Araq | zetashift: provide two * operators |
17:07:42 | FromGitter | <zetashift> Is that okay/normal? Or should I just be like `just use it like this and not that` |
17:08:41 | * | marmotini_ quit (Remote host closed the connection) |
17:08:42 | Araq | it's okay, the compiler cannot know your * is commutative |
17:08:52 | FromGitter | <zetashift> ah good to know thanks |
17:09:17 | * | marmotini_ joined #nim |
17:11:55 | * | marmotini_ quit (Remote host closed the connection) |
17:12:10 | * | marmotini_ joined #nim |
17:16:34 | * | couven92 quit (Read error: Connection reset by peer) |
17:16:35 | reversem3 | can nimc compile to ruby ? |
17:16:52 | reversem3 | just curious |
17:16:53 | FromGitter | <zetashift> It cannot |
17:16:58 | * | couven92 joined #nim |
17:17:06 | disruptek | zetashift: also, this is the behavior you want. |
17:19:22 | reversem3 | are there plans for nimc to compile ES6 ? |
17:20:38 | Araq | there is an RFC and an implementation somewhere |
17:20:45 | * | tane joined #nim |
17:24:19 | dadada | ..- implementation that relies on countdown https://play.nim-lang.org/#ix=2dtl |
17:25:23 | leorize | a lot would parse it as `.. -0` lol |
17:25:39 | dadada | leorize: that throws me of too |
17:25:42 | Araq | https://play.nim-lang.org/#ix=2dtm dadada |
17:27:36 | disruptek | we need to cure you of ": " versus ":\n" 😁 |
17:28:40 | Araq | dadada, so use .-. instead as the operator symbol |
17:29:09 | Araq | or come up with something better. Hint: I never found a good symbol so it's 'countdown' |
17:29:46 | * | marmotini_ quit (Remote host closed the connection) |
17:30:08 | disruptek | ↓ works well. |
17:30:19 | * | marmotini_ joined #nim |
17:30:49 | reversem3 | '..-' is a template ? |
17:31:13 | * | root____3 joined #nim |
17:31:27 | * | Zevv quit (Quit: leaving) |
17:31:37 | * | Zevv joined #nim |
17:31:37 | * | Zevv quit (Changing host) |
17:31:37 | * | Zevv joined #nim |
17:32:04 | FromDiscord | <Recruit_main70007> how do you make a number `n` to the power of `x` in nim? |
17:32:04 | FromDiscord | <Recruit_main70007> like `(n ** x)` in python |
17:32:25 | dadada | pow(a, b) |
17:32:35 | leorize | a ^ b |
17:34:03 | FromDiscord | <Recruit_main70007> can they be floats? |
17:34:26 | * | marmotini_ quit (Ping timeout: 240 seconds) |
17:34:34 | * | root____3 left #nim (#nim) |
17:37:16 | * | adalricus quit (Quit: ERC (IRC client for Emacs 26.3)) |
17:38:43 | * | adalricus joined #nim |
17:39:15 | * | alexander92 quit (Ping timeout: 260 seconds) |
17:43:19 | dadada | how about !.. or ..! for countdown ! negates counting up to counting down ... like != and == doing the opposite |
17:43:46 | dadada | s/doing the/testing the |
17:45:43 | disruptek | you may as well just implement a reversal operator like 🗘 |
17:46:20 | dadada | disruptek: can't display that character |
17:46:27 | disruptek | sure i can. |
17:48:08 | FromDiscord | <Rika> @Recruit_main70007 pow for float, caret for int |
17:48:27 | * | m|b_ joined #nim |
17:48:29 | FromDiscord | <Recruit_main70007> yeah, i just didnt knew it was in the math module |
17:49:19 | FromDiscord | <Rika> Dunno why imo |
17:50:31 | * | adalricus quit (Remote host closed the connection) |
18:10:08 | * | marmotini_ joined #nim |
18:20:36 | * | marmotini_ quit (Read error: Connection reset by peer) |
18:20:50 | * | marmotini_ joined #nim |
18:38:08 | * | jjido joined #nim |
18:40:11 | * | Hideki_ joined #nim |
18:44:48 | * | Hideki_ quit (Ping timeout: 256 seconds) |
18:46:46 | * | nsf quit (Quit: WeeChat 2.7) |
18:50:28 | * | ksandvik joined #nim |
18:51:05 | * | chemist69 quit (Ping timeout: 240 seconds) |
18:52:17 | * | chemist69 joined #nim |
18:56:03 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:00:06 | oz | well, `10..-0` looks less expressive than `10.countdown(0)`, but you have macros so you can do your stuff. :) |
19:00:52 | reversem3 | macros are like having super powers |
19:01:17 | reversem3 | its what makes CL a lot of fun to program in also |
19:02:05 | oz | sure, still if you want to 10.countdown(2), you'd write (10..-2). Somehow confusing. |
19:05:11 | disruptek | is it really that crazy to let the user define the set of exceptions that are fatal? |
19:06:25 | Araq | disruptek, no but it's a new idea |
19:06:32 | Araq | congrats :-) |
19:09:45 | disruptek | would you make it a binary fatal:unwind or fatal:unwind:catchable? |
19:09:46 | * | solitudesf joined #nim |
19:12:01 | FromGitter | <zetashift> The whole countdown also needs an iterator sounds like bikeshedding to me... but Scala has a `to` function so you can do `(10 to 1 by -10` |
19:12:08 | FromGitter | <zetashift> ) forget this |
19:13:02 | FromGitter | <zetashift> also should one use unittest or testament? I recall most just use unittest but the module docs for recommend taking a look at testament but doesn't really explain when you would use what |
19:13:39 | disruptek | unittest is probably more future-proof because there's so much of it in the wild. |
19:14:17 | disruptek | i won't recommend it, but you can take a look at testutils for another take we did recently. |
19:14:20 | disruptek | !repo testutils |
19:14:21 | disbot | https://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 4⭐ 1🍴 |
19:14:52 | * | krux02 joined #nim |
19:19:35 | Araq | "unittest is probably more future-proof because there's so much of it in the wild." |
19:20:00 | Araq | can't disagree, it's unkillable |
19:20:33 | Araq | at the same time testament is a stable bet, we have thousands of tests written for it |
19:20:53 | disruptek | and it more closely models the thinking for a future architecture. |
19:21:00 | disruptek | testament, i mean. |
19:21:07 | Araq | we'll only migrate to a different tool when hell freezes over |
19:21:58 | disruptek | if you're looking for docs, look into contributing/compiler docs and you'll find a testament section. |
19:22:15 | FromGitter | <zetashift> Where are the docs for testament? |
19:22:19 | FromGitter | <zetashift> ah lol |
19:22:25 | FromGitter | <zetashift> it's like you read my mind |
19:22:29 | leorize | wait there are docs? :p |
19:22:51 | disruptek | doc/contributing.rst |
19:22:56 | leorize | when I first wrote a test I just read testament/spec.nim lol |
19:23:11 | * | floppydh quit (Quit: WeeChat 2.7.1) |
19:23:16 | leorize | it's nice that there is a doc indeed |
19:23:21 | disruptek | yeah, they aren't comprehensive, but at least they exist. |
19:24:05 | Araq | the good news is that you can use both unittest and testament at the same time |
19:24:15 | Araq | so you don't have to choose, they are doing different things |
19:24:41 | leorize | so what are the problems with unittest? |
19:24:49 | leorize | I might be able to figure out a few solutions |
19:24:54 | Araq | I don't understand the implementation |
19:25:03 | Araq | the DSL is ok I guess |
19:25:22 | disruptek | they target different needs. |
19:25:24 | Araq | the implementation looks like a stress test for Nim's template expansion mechanism |
19:25:40 | Araq | which shouldn't be its purpose |
19:26:03 | leorize | we can backup the old implementation as a stress test then lol |
19:26:04 | disruptek | araqlogic favors 11-line solutions. |
19:26:29 | shashlick | was there any code added recently that detects whether nim is running on arm |
19:26:34 | FromDiscord | <exelotl> lol reminds me of when I tried reading the source of nim-glm |
19:26:38 | FromGitter | <zetashift> well it's just a dumb raytracing project so I can just testament and fiddle with does no harm |
19:27:18 | leorize | shashlick: not that I know of |
19:27:22 | leorize | are you having problems? |
19:27:37 | shashlick | trying to fix armv7 and armv7a nightlies failure |
19:28:04 | shashlick | `nim c koch` is picking arm by default - https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L23 |
19:28:30 | shashlick | how does nim decide to use that compiler without giving any flags |
19:29:23 | Araq | shashlick, the bootstrap process detect the CPU |
19:29:31 | Araq | *detects |
19:29:57 | Araq | and the OS, so arm.linux.gcc is applied for builds |
19:30:17 | shashlick | was this recent? |
19:30:28 | leorize | shashlick: it appears to be a bug with csources |
19:30:46 | Araq | it's old maybe "arm-linux-gnueabihf-gcc" isn't a thing anymore |
19:31:07 | shashlick | cause all the other arm builds work, only for armv7 and armv7a, it suddenly uses that compiler |
19:31:34 | shashlick | i have to specify the c compiler in nim.cfg in nightlies and all the others which are different from arm-linux-gnueabihf-gcc work fine |
19:32:24 | leorize | it's better to specify your compiler |
19:33:56 | shashlick | for arm64, it picked the gcc.exe compiler - https://travis-ci.org/nim-lang/nightlies/jobs/658108779#L10073 |
19:34:03 | shashlick | that i have configured in nim.cfg |
19:34:15 | shashlick | but not on armv7a - https://travis-ci.org/nim-lang/nightlies/jobs/658108777#L10057 |
19:34:33 | shashlick | or armv7 |
19:35:37 | shashlick | and this did work before, i need to see when it broke now |
19:35:57 | shashlick | this is the csources built nim that's doing this |
19:36:05 | shashlick | when was csources locked |
19:36:44 | * | jjido joined #nim |
19:39:30 | Araq | we locked it before releasing v1 iirc |
19:39:56 | shashlick | Ya and nightlies had been failing since Dec |
19:40:07 | shashlick | So probably not csources |
19:40:19 | shashlick | Will dig some more |
19:40:33 | Araq | as I said, the travis setup might have changed |
19:40:57 | * | Trustable joined #nim |
20:04:05 | * | Trustable quit (Remote host closed the connection) |
20:04:33 | * | sz0 quit (Quit: Connection closed for inactivity) |
20:05:24 | FromGitter | <zetashift> So I've been looking around Nim's codebase looking for testament examples to learn from, but.. I can't find them? Anyone got some examples on how to use cause I'm looking wrong :( |
20:05:37 | disruptek | see the tests/ directory. |
20:06:02 | FromGitter | <zetashift> I did most files contain a """discard .. """ section and then an expression |
20:06:06 | * | Trustable joined #nim |
20:06:14 | disruptek | oh yeah? |
20:06:24 | Araq | lol |
20:07:28 | * | m|b_ quit (Quit: Connection closed for inactivity) |
20:07:55 | * | zahary quit (Quit: Leaving.) |
20:08:29 | FromGitter | <zetashift> well not really an expression but somewhat like this: https://github.com/nim-lang/Nim/blob/devel/tests/borrow/tinvalidborrow.nim |
20:09:32 | disruptek | those are testament specs, buddy. |
20:10:04 | FromGitter | <zetashift> dang okay |
20:11:21 | * | nsf joined #nim |
20:18:09 | * | nsf quit (Quit: WeeChat 2.7) |
20:21:30 | * | noonien joined #nim |
20:25:29 | FromDiscord | <kodkuce> what heppend to -new runtime ? |
20:26:07 | Araq | it's --gc:arc, upcoming release has it |
20:26:30 | * | Zectbumo joined #nim |
20:28:19 | shashlick | interesting - checking out Nim from git and csources from git, i can build just fine |
20:28:34 | shashlick | but if i use a nightlies .tar.xz with the ccode in there, it doesn't work |
20:28:59 | shashlick | same devel commit as nightlies |
20:29:03 | FromGitter | <zetashift> Does `testament all` run all the tests cases in the projects tests dir? |
20:29:07 | disruptek | i don't suppose you're using choosenim in that test, are ya? |
20:30:09 | shashlick | this is nightlies |
20:36:35 | * | zahary joined #nim |
20:39:33 | shashlick | more fun - so csources is different from c_code generated during nightlies |
20:40:04 | Araq | well csources is pinned and c_code is dynamic |
20:40:21 | shashlick | okay that explains why koch boot works with repo csources but then the bootstrapped nim again fails the same way |
20:40:26 | Araq | maybe it was caused by our changes to niminst check 'git log -p' |
20:40:42 | shashlick | so that means there's a nim code change that broke this |
20:41:01 | shashlick | failure is on this page - https://github.com/nim-lang/Nim/commits/devel?after=cb0f7c5d9e1534cf3d43be9eade316bfc7fe25ad+314 |
20:41:24 | Araq | who knows |
20:41:30 | shashlick | between a3d45d0 which passed nightlies and 3524944 which failed the next day |
20:41:42 | shashlick | i am yet to bisect to know exact one |
20:41:59 | shashlick | that's 11 commits |
20:42:32 | shashlick | and https://github.com/nim-lang/Nim/commit/e4f7656772657069cd3e27704d687b292d8d24ab seems suspicious from the name |
20:48:17 | shashlick | i think that is the root cause of the break - it picks arm as the target CPU and then picks the nim.cfg compiler |
20:49:00 | shashlick | even though we only want to use gcc.exe as the compiler |
20:49:42 | disruptek | this sounds so familiar. did leorize have any ideas? |
20:51:01 | * | marmotini_ quit (Remote host closed the connection) |
20:51:11 | leorize | it was to fix this bug: https://github.com/nim-lang/Nim/issues/8921 |
20:51:12 | disbot | ➥ .cfg cross-compilation not working |
20:51:31 | * | chemist69 quit (Ping timeout: 272 seconds) |
20:51:34 | * | marmotini_ joined #nim |
20:51:55 | * | chemist69 joined #nim |
20:53:54 | * | marmotini_ quit (Read error: Connection reset by peer) |
20:54:12 | * | marmotini_ joined #nim |
20:54:35 | * | Trustable quit (Remote host closed the connection) |
20:58:14 | FromGitter | <zetashift> I think I'm just gonna go for doAsserts for now ;P |
21:00:20 | * | NimBot joined #nim |
21:09:08 | * | marmotini_ quit (Read error: Connection timed out) |
21:09:44 | * | marmotini_ joined #nim |
21:15:45 | * | marmotini_ quit (Remote host closed the connection) |
21:16:19 | * | marmotini_ joined #nim |
21:18:58 | shashlick | @leorize - how is that the correct fix for this? there's no detail in that issue |
21:20:55 | * | marmotini_ quit (Ping timeout: 260 seconds) |
21:21:22 | leorize | oh, now you say it, I've looked deeper and... the fix is weird |
21:23:14 | leorize | it doesn't make any sense at all |
21:24:47 | shashlick | in nightlies, i simply change gcc.exe to point to $CC which is set in each dockcross image as the appropriate for that arch |
21:24:59 | leorize | why is host-to-host cross compiling even a thing? |
21:25:23 | leorize | if you're doing host-to-host is that even "cross compiling"? |
21:25:43 | shashlick | without that if statement, it always changes compiler based on target CPU |
21:26:02 | shashlick | what i don't get is that i do not tell nim anything about the target CPU besides changing the compiler used |
21:26:09 | shashlick | so i don't understand why arm even comes in the picutre |
21:26:19 | shashlick | and how it doesn't break armv6, arm64, etc |
21:26:43 | leorize | probably because that was the right compiler name for them |
21:27:10 | leorize | so the "fix" causes $cpu.$os.gcc.exe to always be preferred no matter what |
21:27:29 | shashlick | no, it is different - see https://travis-ci.org/nim-lang/nightlies/jobs/658108779#L10073 for arm64 |
21:27:48 | leorize | well there's no arm64.linux.gcc.exe in the default nim.cfg |
21:27:53 | leorize | so it defaults to gcc.exe |
21:28:18 | leorize | this is an undocumented behavior change afaict |
21:29:23 | shashlick | how about armv6 then |
21:30:21 | shashlick | you are right, we get lucky on armv6 |
21:30:29 | shashlick | https://travis-ci.org/nim-lang/nightlies/jobs/658108776#L11561 |
21:31:16 | shashlick | okay that explains it |
21:33:27 | leorize | so as far as the compiler documentation is concerned, this makes the behavior no longer align with the implementation |
21:34:00 | leorize | it's hard to decide which behavior is better, but for backward compatibility we should revert that commit |
21:34:14 | * | narimiran quit (Ping timeout: 256 seconds) |
21:34:18 | shashlick | well, i still don't see what the issue is in the first place |
21:34:32 | * | marmotini_ joined #nim |
21:34:39 | leorize | same |
21:35:17 | leorize | just make a PR that reverts it |
21:35:24 | shashlick | cause original error is about arm, then suddenly mingw comes up |
21:35:32 | leorize | then tag nc-x in |
21:36:21 | shashlick | wait, again, how does nim know we want arm as the cpu when all i'm doing is changing gcc.exe |
21:36:45 | shashlick | does it run the gcc command to figure out target and then set that as a target and then load the compiler again from nim.cfg? |
21:36:49 | leorize | it's the hostCpu |
21:36:59 | leorize | the constant is decided when you compile csources |
21:37:19 | * | xet7 joined #nim |
21:37:33 | leorize | csources have different code for each architecture, and it hardcodes the strings "arm", "arm64", etc. to use as hostCpu |
21:37:54 | shashlick | i've run build.sh with --cpu arm |
21:38:21 | leorize | yep, which instructed the build system to build an arm version of the compiler |
21:38:39 | shashlick | and it runs fine on the x86_64 docker image because of qemu |
21:38:54 | leorize | which have "arm" hardcoded as hostCpu |
21:38:57 | shashlick | so nim isn't really using uname -m |
21:39:12 | shashlick | no, if you run uname -m, it says x86_64 |
21:39:26 | shashlick | but like you are saying, it is hardcoding arm in the compiler build |
21:39:34 | shashlick | probably not even looking at the actual host CPU |
21:39:42 | leorize | yep |
21:40:37 | leorize | there aren't much reason to do this by actually looking up |
21:41:00 | leorize | we can just assume that the host will be of the architecture that the compiler was compiled with |
21:41:04 | shashlick | okay i'll need to think how to explain the revert |
21:41:17 | shashlick | wouldn't it rather be the targetCPU |
21:44:34 | * | abm quit (Quit: Leaving) |
21:47:52 | disruptek | if shashlick ever gets hit by a bus we're gonna be well and truly fucked. |
21:48:06 | shashlick | i live in the burbs, no buses here |
21:55:31 | disruptek | shashlick you have kids, right? |
21:55:36 | disruptek | carriers? |
21:55:45 | shashlick | yep |
21:55:50 | disruptek | how many agents of infection? |
21:55:52 | FromDiscord | <Elegant Beef> i doubt one person owns aircraft carriers |
21:57:28 | * | sagax quit (Read error: Connection reset by peer) |
22:00:55 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:04:01 | * | filcuc joined #nim |
22:06:04 | * | al1ranger joined #nim |
22:06:22 | * | Zectbumo quit (Remote host closed the connection) |
22:06:30 | shashlick | @leorize: it is still not clear to me how that missing if condition is breaking us |
22:09:09 | shashlick | okay I think i got it |
22:09:15 | * | marmotini_ quit (Remote host closed the connection) |
22:09:50 | * | marmotini_ joined #nim |
22:13:20 | * | solitudesf quit (Ping timeout: 256 seconds) |
22:14:35 | * | marmotini_ quit (Ping timeout: 260 seconds) |
22:14:55 | * | marmotini_ joined #nim |
22:18:41 | * | al1ranger quit (Quit: Leaving) |
22:20:02 | shashlick | leorize: https://github.com/nim-lang/Nim/pull/13591 |
22:20:03 | disbot | ➥ Revert "Support cross compiling from host to host (#12859)" |
22:24:56 | * | Vladar quit (Quit: Leaving) |
22:36:53 | * | zahary quit (Quit: Leaving.) |
22:42:04 | * | Hideki_ joined #nim |
22:46:50 | * | Hideki_ quit (Ping timeout: 265 seconds) |
22:49:37 | * | disbot quit (Quit: Bye) |
22:49:37 | * | disruptek quit (Quit: Bye) |
22:50:08 | * | theelous3_ quit (Quit: is outty) |
22:51:53 | * | Zectbumo joined #nim |
22:56:14 | * | tane quit (Quit: Leaving) |
23:01:03 | * | marmotini_ quit (Remote host closed the connection) |
23:01:35 | * | marmotini_ joined #nim |
23:04:33 | * | krux02 quit (Remote host closed the connection) |
23:06:02 | * | marmotini_ quit (Ping timeout: 256 seconds) |
23:06:29 | * | disbot joined #nim |
23:07:31 | * | disruptek joined #nim |
23:11:04 | * | couven92 quit (Read error: Connection reset by peer) |
23:11:31 | * | couven92 joined #nim |
23:24:50 | * | lritter quit (Ping timeout: 240 seconds) |
23:25:05 | * | zahary joined #nim |
23:39:09 | ksandvik | filter add irc_smart * isrc_smart_filter * |
23:39:15 | ksandvik | oops. |
23:42:33 | disruptek | okay, i am back in business and i'll stream adding the bug-catcher to IC later this evening. looks like i just have to figure out how to leak the module graph nearer to the check-if-the-types-are-fully-baked proc. |
23:43:13 | disruptek | hopefully get that sorted tonight and then can work on tarjan's algo tomorrow. |
23:48:20 | * | filcuc quit (Quit: Konversation terminated!) |