00:06:00 | * | xet7 quit (Remote host closed the connection) |
00:06:38 | * | cron quit (Quit: Leaving.) |
00:07:13 | * | krux02_ joined #nim |
00:07:32 | * | sammich joined #nim |
00:10:45 | * | krux02 quit (Ping timeout: 246 seconds) |
00:16:34 | * | lxbarbosa quit (Remote host closed the connection) |
00:34:15 | * | Pqzcih5 quit (Remote host closed the connection) |
00:34:33 | * | cron joined #nim |
00:41:28 | * | ng0 quit (Quit: leaving) |
00:47:47 | FromDiscord_ | <Recruit_main_70007> Thanks both, I love this community |
01:05:51 | * | gangstacat joined #nim |
01:10:28 | * | ftsf quit (Quit: Leaving) |
01:20:13 | * | lritter quit (Quit: Leaving) |
01:57:27 | * | oculuxe quit (Ping timeout: 268 seconds) |
01:57:50 | * | oculux joined #nim |
02:14:48 | * | krux02_ quit (Remote host closed the connection) |
02:15:14 | * | ptdel joined #nim |
02:22:44 | * | icebattle quit (Ping timeout: 268 seconds) |
02:27:34 | * | NimBot joined #nim |
02:46:31 | * | cgfuh quit (Quit: WeeChat 2.6) |
03:10:03 | * | icebattle joined #nim |
03:10:08 | * | rockcavera quit (Remote host closed the connection) |
03:14:43 | * | icebattle quit (Ping timeout: 268 seconds) |
03:36:26 | * | ltriant quit (Quit: leaving) |
03:44:01 | * | muffindrake quit (Ping timeout: 272 seconds) |
03:45:43 | * | tefter joined #nim |
03:45:45 | * | muffindrake joined #nim |
03:46:53 | disruptek | ~motd recommend your favorite book on kernel design |
03:46:54 | disbot | no matching footnotes for `motd` with regexps `recommend, your, favorite, book, on, kernel, design`. 🙁 |
03:46:58 | disruptek | ~motd is recommend your favorite book on kernel design |
03:46:59 | disbot | motd: 11recommend your favorite book on kernel design |
03:47:02 | disruptek | DO IT NOW |
03:47:34 | disruptek | oh yeah, did i mention that you can use regexp on footnotes? |
03:47:48 | disruptek | i have no idea how that works, btw. |
03:52:53 | * | dddddd quit (Ping timeout: 272 seconds) |
04:02:08 | * | endragor joined #nim |
04:19:03 | * | icebattle joined #nim |
04:24:03 | * | icebattle quit (Ping timeout: 260 seconds) |
04:26:12 | * | pqflx3[m] joined #nim |
04:26:44 | * | chemist69 quit (Ping timeout: 248 seconds) |
04:28:41 | * | chemist69 joined #nim |
04:48:43 | * | icebattle joined #nim |
04:52:59 | * | nsf joined #nim |
04:53:23 | * | icebattle quit (Ping timeout: 268 seconds) |
04:53:39 | * | marmotini_ joined #nim |
05:45:14 | * | narimiran joined #nim |
06:22:48 | * | cron quit (Ping timeout: 268 seconds) |
06:47:13 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
06:47:31 | * | Pqzcih5 joined #nim |
07:14:44 | * | uvegbot joined #nim |
07:16:20 | * | zyklon quit (Ping timeout: 248 seconds) |
07:19:35 | * | neceve joined #nim |
07:47:21 | * | Pqzcih5 quit (Remote host closed the connection) |
07:47:34 | * | Pqzcih5 joined #nim |
07:55:04 | * | solitudesf joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:05:11 | * | gmpreussner joined #nim |
08:07:54 | * | PMunch joined #nim |
08:42:00 | * | floppydh joined #nim |
08:43:49 | * | ng0 joined #nim |
08:43:49 | * | ng0 quit (Changing host) |
08:43:50 | * | ng0 joined #nim |
08:58:04 | * | ftsf joined #nim |
08:59:02 | * | skrylar joined #nim |
08:59:40 | skrylar | updated the abuild to 1.0.6; still need to fiddle with subpackages and then bother the maintainer :b |
09:02:27 | * | marmotini_ quit (Remote host closed the connection) |
09:20:05 | * | ftsf_ joined #nim |
09:23:29 | * | ftsf quit (Ping timeout: 272 seconds) |
09:39:21 | Araq | https://docs.python.org/3.8/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging we could copy this |
09:43:58 | FromDiscord_ | <Rika> very easily i bet |
09:50:12 | * | endragor quit (Remote host closed the connection) |
10:11:13 | FromGitter | <alehander92> moorning |
10:15:31 | FromGitter | <Varriount> Araq: Format strings are my favorite new python feature |
10:19:20 | PMunch | Is there a way to get a float as a string that only has the floating part if it's not 0 (or some epsilon)? |
10:22:12 | FromDiscord_ | <Elegant Beef> `a-trunc(a)` would get you the decimal if `a.mod(1)` doesnt |
10:22:25 | FromDiscord_ | <Elegant Beef> Then could check if it's abs > epsilon |
10:22:32 | FromDiscord_ | <Elegant Beef> Might be a smarter method |
10:23:13 | FromDiscord_ | <Elegant Beef> Will need to import math though |
10:23:45 | Zevv | PMunch: https://forum.arduino.cc/index.php?topic=661603.0 Let's see if that results in any usable answers |
10:24:15 | * | cgfuh joined #nim |
10:26:24 | FromGitter | <alehander92> oh kernel design so what book |
10:27:17 | FromDiscord_ | <Elegant Beef> I really think that C#'s string formatting is nicer than pythons there |
10:27:17 | FromDiscord_ | <Elegant Beef> `$" The Duck has {duck.Feet.Count}, which are {duck.Feet.Color}.` |
10:27:17 | FromDiscord_ | <Elegant Beef> or |
10:27:17 | FromDiscord_ | <Elegant Beef> `String.Format("A duck named {0}, can jump {1}.",duck.Name, duck.JumpHeight)` |
10:27:40 | FromDiscord_ | <Elegant Beef> The one is a simple regex though |
10:31:23 | PMunch | Elegant Beef, seems like formatFloat from strutils is what I need |
10:31:32 | FromDiscord_ | <Elegant Beef> I guess |
10:31:59 | FromDiscord_ | <Elegant Beef> I should've got you the decimal though so dont really need anything more then the $ operator after that epsilon check |
10:32:22 | FromDiscord_ | <Elegant Beef> But yea probably smarter to use string utils |
10:35:19 | FromGitter | <alehander92> but no |
10:35:24 | FromGitter | <alehander92> python also has this one elegant beef |
10:35:45 | FromGitter | <alehander92> with `$` as `f".."` and the format is vry similar |
10:36:11 | FromGitter | <alehander92> format method* to String.Format (kinda similar) |
10:38:02 | * | Vladar joined #nim |
10:38:31 | PMunch | Zevv, I don't think it's possible to use a different language in the Arduino IDE.. |
10:38:42 | PMunch | At least I've never seen or heard it mentioned |
10:40:49 | Zevv | It is |
10:40:54 | Zevv | https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification |
10:40:57 | Zevv | They call it 'hardware' :) |
10:41:05 | Zevv | Also getting help on #arduino now |
10:45:39 | * | hinst joined #nim |
10:46:41 | FromGitter | <alehander92> eleg, i forgot we have math :O |
10:46:48 | FromGitter | <alehander92> wow the arduino sounds good |
10:53:05 | * | synapps joined #nim |
10:54:16 | Zevv | alehander92: I might give it a try if I'm bored, it would make a nice story for Nim if you can just unzip and run Nim on your hobby board |
10:55:16 | PMunch | That would be amazing |
10:55:53 | PMunch | Ah, but hardware is actually meant for boards |
10:56:17 | PMunch | So you would have to have something like "Arduino Leonardo (Nim)" and do that for all the supported boards |
10:58:24 | * | sagax quit (Ping timeout: 260 seconds) |
11:03:49 | * | abm joined #nim |
11:17:14 | FromGitter | <kristianmandrup> From Nim changelog. What is a "pattern"? ⏎ ⏎ "Added an `importjs` pragma that can now be used instead of `importcpp` ⏎ and `importc` to import symbols from JavaScript. `importjs` for routines always ⏎ takes a "pattern" for maximum flexibility." [https://gitter.im/nim-lang/Nim?at=5e3169bad9895b17c3ac1730] |
11:17:54 | FromGitter | <kristianmandrup> Similar to the `importcpp pragma for C++ <#foreign-function-interface-importc-pragma>`_, ⏎ the ``importjs`` pragma can be used to import Javascript methods or ⏎ symbols in general. The generated code then uses the Javascript method ⏎ calling syntax: ``obj.method(arg)``. [https://gitter.im/nim-lang/Nim?at=5e3169e1594a0517c2452bff] |
11:21:05 | * | xet7 joined #nim |
11:21:55 | * | xet7 quit (Remote host closed the connection) |
11:22:56 | * | xet7 joined #nim |
11:27:11 | * | synapps left #nim ("WeeChat 2.4") |
11:29:18 | Zevv | PMunch: I have no idea yet, also awaiting the forum. But this should make it feasible to do at least something. |
11:29:39 | Zevv | I could add a nim variant of the most common arduino boards. |
11:29:46 | Zevv | But I never used this stuff, so have to fiddle around with it anyway |
11:32:38 | * | sagax joined #nim |
11:34:00 | FromGitter | <alehander92> @kristianmandrup noo |
11:34:09 | FromGitter | <alehander92> pattern is a bit hard to define imo |
11:34:29 | FromGitter | <alehander92> but usually you write "a(#2, #1)" |
11:34:32 | FromGitter | <alehander92> or something like that |
11:34:48 | FromGitter | <alehander92> a bit like string formatting but with some additional features i guess |
11:42:36 | * | dddddd joined #nim |
11:51:23 | * | leorize quit (Ping timeout: 240 seconds) |
11:55:23 | * | leorize joined #nim |
11:56:08 | PMunch | Zevv, oh for sure. It would be great to have this capability |
11:58:02 | FromGitter | <Vindaar> @PMunch: formatting floats in the "most intuitive" way is kind of hard. `formatBiggestFloat` together with `trimZeros` mostly gets the job done I found (maybe there's a nicer way though). The final problem remains printing 0, because you have to know whether a value is inherently small or is only epsilon away from 0 |
11:58:30 | PMunch | Yeah, for my usecase it's fine |
11:58:37 | PMunch | To just use formatFloat |
11:58:48 | FromGitter | <Vindaar> I use https://github.com/Vindaar/ggplotnim/blob/master/src/ggplotnim/formula.nim#L352-L368 and https://github.com/Vindaar/ginger/blob/master/src/ginger.nim#L247-L268 ⏎ Ahh, good to know :) |
11:59:09 | PMunch | It's for a small stack based calculator/language that I wrote, and so far I'm the only one I know who know how to use the thing :P |
11:59:30 | PMunch | (Although I did write quite a bit of documentation if you feel up for a challenge :P) |
11:59:37 | FromGitter | <Vindaar> I think I remember you talking about it some time ago |
12:01:21 | PMunch | Yeah I probably did when I first created it |
12:02:13 | PMunch | I was thinking about converting it to using some arbitrary precision library instead of floats |
12:02:20 | PMunch | But never got around to it |
12:03:20 | FromGitter | <Vindaar> "never got around to it", yeah tell me about it :| |
12:04:21 | FromGitter | <Vindaar> And while you're here. I tried to run some code of mine with `--gc:arc`. The persistent vector wasn't having it. This line here https://github.com/PMunch/nim-persistent-vector/blob/master/persvector.nim#L56 complained that `deepCopy` isn't defined. I removed it and everything seems to work then. I'm not confident though that this is the correct solution here, haha |
12:16:19 | PMunch | Yeah.. That won't work.. |
12:16:47 | PMunch | Or it will work, but it won't be persintent any longer.. |
12:16:54 | PMunch | persistent* |
12:19:05 | FromGitter | <Vindaar> I thought as much. But I haven't invested the time to understand what happens in `arc` with the `vec` argument. Does it have to be a `sink` or something? |
12:20:09 | PMunch | Well, it only copies a seq here. But the way it works with deepCopy is that you can fill it with ref objects that will also be copied (I think) |
12:25:15 | PMunch | Hmm, readLineFromStdin is weird.. |
12:27:51 | FromGitter | <Vindaar> I'll have to understand `arc` properly first I guess. ⏎ what makes it weird? |
12:28:07 | * | rockcavera joined #nim |
12:29:23 | PMunch | Never mind, it was just behaving strangely with stdin.atEnd |
12:32:57 | * | m|b_ joined #nim |
12:36:25 | Zevv | PMunch: looks like i can make this work. I provide a single file that the user drops into the arduino ide dir, and i wrap avr-g++ to actually do nim under the hood |
12:36:49 | Zevv | its a hack but it might just work |
12:38:52 | PMunch | Interesting, so the IDE would think that it runs avr-g++, but actually it runs a shim that runs Nim and passes the flags along to --passC/L? |
12:39:35 | PMunch | Doesn't the IDE do any kind of error checking by the way? |
12:39:46 | PMunch | I mean it does syntax highlighting, so that would already be a bit wonky :P |
12:40:24 | FromGitter | <alehander92> is it open source |
12:40:30 | PMunch | Think so |
12:41:15 | FromGitter | <alehander92> so cant we just patch the ide |
12:41:44 | m|b_ | Has Nim finally reached version 1.0.0? |
12:42:02 | FromDiscord_ | <mratsim> 4 months ago |
12:42:22 | FromDiscord_ | <demotomohiro> version 1.0.6 is lastest version |
12:42:57 | m|b_ | Oh, that's good news.. |
12:43:04 | Zevv | sure the id indenting and higlghting will be borked. But as soon as the arduino community will see this they will go raving mad of enthausiasm and pick this up and fix this |
12:43:16 | * | krux02 joined #nim |
12:43:23 | m|b_ | That's to say it's production safe, now?? |
12:43:54 | m|b_ | Like those packages in the Future module can now be relied upon? |
12:44:52 | Araq | m|b_, yeah |
12:45:39 | PMunch | Zevv, haha true! |
12:45:43 | FromGitter | <alehander92> what is the Future module |
12:45:48 | FromGitter | <alehander92> there is `sugar` now |
12:45:51 | Araq | the only module I hope to remove is 'typeinfo.nim' |
12:45:55 | m|b_ | Araq: Oh, thanks Mr. Rumpf! But, can I talk to you privately for a second? |
12:46:20 | Araq | no sorry, I'm almost gone |
12:46:31 | Araq | come back in about one hour please |
12:46:44 | * | endragor joined #nim |
12:47:13 | m|b_ | That's perfectly understandable 😇 |
12:47:45 | m|b_ | Though with no explicit guarantees.. |
12:50:44 | m|b_ | FromGitter: well, that's good to know. |
12:50:44 | FromGitter | m|b_, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
12:51:08 | * | endragor quit (Ping timeout: 245 seconds) |
12:51:37 | PMunch | Haha, yeah FromGitter is a bot, it was alehander92 that sent those messages |
12:51:56 | PMunch | In the meantime we might be able to answer your questions by the way |
12:53:00 | m|b_ | Well, it's warm to realize how much, I have to learn.. |
12:53:07 | * | chemist69 quit (Ping timeout: 272 seconds) |
12:53:48 | m|b_ | Well, it's warm to realize how much, I have to learn.. |
12:53:56 | * | chemist69 joined #nim |
12:56:38 | m|b_ | PMunch: Thanks for your generosity gem, though my message is strictly reserved for *Andreas* 😇 |
13:07:24 | * | Amun_Ra quit (Ping timeout: 265 seconds) |
13:09:36 | FromDiscord_ | <demotomohiro> Nim 1.0.6 is available at wandbox. |
13:09:37 | FromDiscord_ | <demotomohiro> https://wandbox.org/permlink/PG0Oawgizzjkmjwg |
13:10:39 | * | Amun_Ra joined #nim |
13:12:53 | FromGitter | <zetashift> sweet, before the Nim playground I only used wandbox |
13:15:53 | PMunch | Yay, now stacklang can be run as a program with arguments :) |
13:16:04 | PMunch | stacklang 1 2 \+ display |
13:16:23 | PMunch | Or: stacklang '1 2 + display' |
13:16:41 | m|b_ | @demotomohiro Thanks! I'll check that out, straight away! |
13:18:38 | PMunch | Hmm, I wonder if the playground updated properly this time |
13:18:57 | PMunch | Yay! It did :) |
13:19:02 | PMunch | So now that is fully automatic |
13:20:41 | PMunch | m|b_, check out https://play.nim-lang.org as wel if you want to try Nim in your browser |
13:20:45 | FromGitter | <kristianmandrup> I'm trying to add/improve docs in the `Nim` repository (cloned). How do I generate the docs? |
13:20:48 | FromGitter | <kristianmandrup> `$ rst2html myfile.rst output.html` |
13:21:07 | FromGitter | <kristianmandrup> I've installed `docutils` |
13:21:11 | FromGitter | <kristianmandrup> RST comes with `docutils` where you have `rst2html` |
13:21:31 | PMunch | ./koch docs |
13:21:39 | FromGitter | <kristianmandrup> But binary `rst2html` not available (PATH issue I guess) |
13:22:16 | FromGitter | <kristianmandrup> on a Mac. Guess I have to install `koch`? |
13:22:35 | PMunch | It's in the Nim repository |
13:22:47 | PMunch | You should just have to do "nim c koch" to beuld it |
13:22:51 | PMunch | build* |
13:22:58 | FromGitter | <kristianmandrup> `pip install koch` |
13:23:02 | FromGitter | <kristianmandrup> okay |
13:23:13 | PMunch | What, pip is for Python modules :P |
13:23:37 | narimiran | "How do I generate the docs?" -- nim doc path/to/my/file.nim |
13:23:39 | FromGitter | <kristianmandrup> cool. It built koch, and then I could run `koch docs` :) |
13:23:56 | FromGitter | <kristianmandrup> Thanks @PMunch and @namiran |
13:24:02 | narimiran | and then, `open file.html` |
13:24:02 | PMunch | narimiran, well that is to generate the documentation for one file |
13:24:13 | PMunch | I think he wanted to build the documentation for Nim |
13:25:24 | FromGitter | <kristianmandrup> @PMunch - Exactly |
13:25:40 | FromGitter | <kristianmandrup> Need to see how the docs look with my suggested improvements |
13:25:52 | FromGitter | <kristianmandrup> Trying to improve docs for backend interop and FFI |
13:26:02 | m|b_ | PMunch: you're a genius! Thanks gem! |
13:26:21 | FromGitter | <kristianmandrup> Now I'm running the full build unfortunately... |
13:27:47 | FromGitter | <kristianmandrup> Not sure how to only generate the docs. Seemed like I did way too much when I ran .`/koch docs`? |
13:27:49 | FromGitter | <kaushalmodi> @kristianmandrup If want to test edits to an rst file, then may be you just need to do `nim rst2html foo.rst` |
13:27:58 | FromGitter | <kaushalmodi> see `nim --fullhelp` |
13:28:35 | PMunch | Yeah if you just want to check a single rst file then you can run that |
13:28:48 | PMunch | Or as narimiran said for a single file "nim doc file.nim" |
13:28:53 | FromGitter | <kaushalmodi> Summary: ⏎ ⏎ 1) .nim -> .html: `nim doc foo.nim` ⏎ 2) .rst -> .html: `nim rst2html foo.rst` [https://gitter.im/nim-lang/Nim?at=5e318895f6945f41ef3914e0] |
13:32:37 | * | cgfuh quit (Ping timeout: 268 seconds) |
13:33:32 | FromGitter | <kristianmandrup> @kaushalmodi Perfect :) |
13:44:46 | * | cgfuh joined #nim |
13:54:23 | * | leorize quit (Ping timeout: 240 seconds) |
13:54:59 | * | leorize joined #nim |
14:03:13 | * | skrylar quit (Remote host closed the connection) |
14:14:01 | PMunch | Hmm, this language is really weird to use. But its simplicity has a certain kind of beauty to it.. |
14:14:17 | PMunch | ^ not Nim, but stacklang |
14:14:58 | WilhelmVonWeiner | have you ever tried Forth? |
14:15:21 | PMunch | Haha, yes |
14:15:34 | WilhelmVonWeiner | damn, no opportunity to proselytise |
14:16:09 | * | flinterson joined #nim |
14:16:36 | PMunch | I mean, forth is nice. But I wanted to use this as a replacement for using a graphical RPN calculator. And I don't use that calculator enough that I would remember Forths syntax between each time |
14:17:26 | PMunch | So I created stacklang to be as simple as possible for the super simple "just do a bit of math" mode, and then I bolted on a bunch of wacky features to do things like loops and functions |
14:17:45 | WilhelmVonWeiner | I loled at functions being "wacky" |
14:18:18 | PMunch | All the while making sure that no feature had any overlap with any other feature and leaving out things that could be written as a language command |
14:18:34 | WilhelmVonWeiner | I love that kind of approach |
14:18:39 | PMunch | Haha, functions itself aren't wacky. But the way you create them in stacklang is, well, a bit strange :P |
14:18:45 | WilhelmVonWeiner | a very extreme minimalism |
14:18:51 | WilhelmVonWeiner | yet pragmatic |
14:20:30 | PMunch | So if you try to push something that is a command onto the stack it will run it instead, so if you type "1 2 +" the stack will be "3" because it ran the built-in "+" command. If you preface anything with "\" it will ignore this and just push it directly to the stack, so if you do "1 2 \+" the stack will be "1 2 +". So in order to create a function you push the things you want to happen in your function to the stack and then run the "makecmd" command. |
14:20:55 | WilhelmVonWeiner | have you heard of a language called Retro Forth |
14:21:02 | WilhelmVonWeiner | inspired by Joy and Factor |
14:22:14 | WilhelmVonWeiner | quotations do something similar, where [ dup push ] would put that block of code on the stack |
14:23:30 | PMunch | And this exposes another fun concept of the language, for how does makecmd know how many tokens to add to the function? Well, every command that needs information about the stack can take either a positive number as an index, a negative number as a count, or a label as a position. So you you do "1 2 \+ -2 makecmd" the stack will be "1 tmp2930" where tmp2930 is the name of the command and -2 told it to grab two tokens to the command. So the command would be |
14:23:31 | PMunch | "2 +". |
14:23:47 | PMunch | From there on you can either name the function, or use "call" to call the token. |
14:24:06 | WilhelmVonWeiner | maybe you would find the syntactical construct [ ] useful then |
14:24:18 | WilhelmVonWeiner | to save the +/-n indexing |
14:24:43 | WilhelmVonWeiner | [ 1 2 + ] vs `1 2 \+ -2 makecmd` |
14:25:03 | PMunch | If you give it a label it will automatically create a function by that name, so "1 addtwo 2 \+ addtwo makecmd" will give a stack of "1" and create a command named "addtwo" that is "2 +". |
14:25:06 | WilhelmVonWeiner | then you can loop inside [ ] if you wanted (with macros.) |
14:25:56 | PMunch | Ah, I have defined a command ")" in my environment which is defined as: "\\rand7087 \delcmd ( mkcmd \rand7087 \rand7087 \( name" |
14:26:36 | WilhelmVonWeiner | well if you have some time you might like to check it out, retroforth.org or #Retro on Freenode |
14:26:47 | WilhelmVonWeiner | I actually plan to write an implementation of the super simple VM in Nim |
14:27:01 | PMunch | It creates a new command named rand7087 that is everything from the last ( and which deletes itself when run (but puts a token on the stack to call the function). |
14:28:15 | PMunch | Hmm, retroforth looks interesting. But again a lot more concepts than you need in a calculator. |
14:28:53 | PMunch | My idea was to have as few concepts as possible. The only two data-types are numbers and labels. |
14:29:03 | WilhelmVonWeiner | Retro has no types/ |
14:29:15 | PMunch | You have a way to store variables, and a way to define commands. |
14:29:18 | PMunch | But that's about it |
14:29:36 | WilhelmVonWeiner | just signed 32 bit integers, so actually, it might not meet the needs of your RPN |
14:30:01 | PMunch | No floating point? |
14:30:05 | * | marmotini_ joined #nim |
14:30:18 | PMunch | I was actually thinking of converting my code to not use floats but arbitrary precision numbers |
14:30:22 | WilhelmVonWeiner | there is floating point done in some crazy maths way |
14:30:31 | PMunch | That way you won't get those silly 1.0000000001 bugs |
14:30:47 | PMunch | After all, this is meant to be a calculator |
14:31:41 | PMunch | I also kinda want to add display modes to do IO in hex/bin/oct/dec |
14:32:09 | WilhelmVonWeiner | The floating point is some crazy method of converting 64 bit floats to 32-bit ints |
14:32:34 | WilhelmVonWeiner | with a range of 10^-9 to 10^9 and "a 32-bit accuracy near zero" |
14:35:49 | PMunch | Problem is that none of the bignum implementations in Nim fits my goal of pure Nim and has all the math operations in the standard library.. |
14:36:01 | * | marmotini_ quit (Read error: Connection reset by peer) |
14:37:05 | FromDiscord_ | <Rika> when i heard stacklang i thought "is that another forth/factor implementation?" |
14:37:39 | PMunch | Nope, completely new thing |
14:37:52 | PMunch | I had just used forth when I started writing it though |
14:38:32 | FromDiscord_ | <Rika> is it similar? |
14:39:54 | PMunch | Well, they are both stack-based |
14:40:22 | PMunch | https://github.com/PMunch/stacklang |
14:44:12 | FromDiscord_ | <Rika> i like it |
14:45:02 | PMunch | It certainly has a charm to it |
14:45:28 | * | marmotini_ joined #nim |
14:51:43 | PMunch | Just don't read until the "branching logic, gotos, loops, and commands within commands" section :P |
14:51:52 | PMunch | That is where the madness really unfolds |
14:54:26 | * | pbb_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
14:58:23 | Yardanico | damn my repl example with mathexpr (and of course with some perf fixes I did to it) compiled with -d:danger, --gc:arc and LTO is a 64 kbytes binary on linux |
14:58:29 | Yardanico | without --gc:arc and with LTO too it's 88kbytes :P |
14:58:34 | Yardanico | (both with strip -s binary) |
14:59:26 | * | marmotini_ quit (Read error: Connection reset by peer) |
15:00:21 | Yardanico | did anyone try compiling Nim compiler with LTO? 🤔 |
15:00:26 | Yardanico | will it get faster? :P |
15:00:56 | * | JustASlacker quit (Quit: Leaving) |
15:01:06 | PMunch | Hmm |
15:01:11 | PMunch | Interesting thought |
15:02:54 | Yardanico | i'll try now maybe :P |
15:03:08 | * | endragor joined #nim |
15:03:39 | Yardanico | I'll capture "time sh build_all.sh" without any caches with normal build, and then try to build a LTO'd compiler and try with it again |
15:04:07 | PMunch | Doesn't build_all use csources? |
15:04:31 | Yardanico | ah right my bad |
15:04:42 | * | PMunch quit (Quit: Leaving) |
15:05:32 | * | marmotini_ joined #nim |
15:07:16 | * | marmotini_ quit (Remote host closed the connection) |
15:07:55 | * | pbb joined #nim |
15:11:10 | Yardanico | damn linking nim compiler takes quite a while with LTO |
15:14:55 | * | endragor quit (Remote host closed the connection) |
15:15:20 | Yardanico | even got some warnings |
15:15:29 | Yardanico | nim nimCmpMem: " warning: ‘memcmp’ specified size between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]" |
15:16:41 | * | endragor joined #nim |
15:16:58 | Yardanico | executables are equal: SUCCESS! |
15:17:29 | FromGitter | <kristianmandrup> I'm trying to improve the Nim docs on backend, esp. JavaScript interop |
15:17:32 | FromGitter | <kristianmandrup> https://github.com/nim-lang/Nim/pull/13295/files |
15:17:33 | disbot | ➥ restructure docs and improve docs for JavaScript interop |
15:17:34 | FromGitter | <kristianmandrup> WIP |
15:17:34 | Yardanico | seems like I managed to build the compiler with LTO |
15:18:27 | Yardanico | hmm, how to compare performance now |
15:20:08 | * | marmotini_ joined #nim |
15:20:38 | * | ng0_ joined #nim |
15:20:56 | Yardanico | ah, right, compileOnly |
15:21:28 | * | icebattle joined #nim |
15:21:53 | * | endragor quit (Remote host closed the connection) |
15:23:07 | * | marmotini_ quit (Remote host closed the connection) |
15:23:30 | * | ng0 quit (Ping timeout: 265 seconds) |
15:26:02 | * | icebattle quit (Ping timeout: 240 seconds) |
15:29:58 | Yardanico | hmm, let's try a basic nimx app, nim time only |
15:33:42 | Yardanico | seems like non-LTO'd compiler is faster LOL. well, at least for me |
15:34:24 | * | m|b_ quit (Quit: Connection closed for inactivity) |
15:42:12 | * | lritter joined #nim |
15:43:36 | disruptek | ~motd |
15:43:36 | disbot | motd: 11recommend your favorite book on kernel design -- disruptek |
15:45:29 | * | ptdel joined #nim |
15:46:58 | * | icebattle joined #nim |
15:52:25 | * | icebattle quit (Ping timeout: 268 seconds) |
15:53:13 | * | oculux quit (Ping timeout: 268 seconds) |
15:53:31 | * | oculux joined #nim |
15:57:10 | * | endragor joined #nim |
16:05:59 | * | ftsf_ quit (Ping timeout: 268 seconds) |
16:09:28 | * | icebattle joined #nim |
16:11:44 | * | endragor quit (Remote host closed the connection) |
16:16:03 | * | icebattle quit (Quit: leaving) |
16:17:55 | * | icebattle joined #nim |
16:18:26 | * | hinst quit (Remote host closed the connection) |
16:26:20 | * | PMunch joined #nim |
16:27:34 | * | Kaivo quit (Quit: WeeChat 2.7) |
16:38:32 | PMunch | Hmm, anyone here speaking Chinese who could help me translate something real quick? |
16:38:59 | PMunch | Got some screen protectors on AliExpress, and they came with a small bag and a brush with instructions in Chinese.. |
16:39:06 | PMunch | I have no idea what they are for. |
16:39:34 | Yardanico | google translate might help (it has a camera mode) |
16:39:40 | Yardanico | on the phone |
16:40:18 | PMunch | Well, it is a QR code to a video with instructions.. |
16:40:24 | Yardanico | ohhh |
16:41:37 | PMunch | Aha, according to the text it is "Edge filler" |
16:41:53 | PMunch | And in the video he seems to apply it to a screen protector that isn't properly sticking around the edge |
16:42:26 | PMunch | Man camera mode translation was way better than I expected :P |
16:43:56 | Yardanico | yeah, translation services are getting better and better with each year :P |
16:45:11 | * | nsf quit (Quit: WeeChat 2.7) |
16:50:23 | * | Trustable joined #nim |
16:50:36 | * | xet7 quit (Remote host closed the connection) |
16:51:50 | * | leorize_ joined #nim |
16:52:57 | * | leorize quit (Disconnected by services) |
16:52:59 | * | xet7 joined #nim |
16:53:03 | * | leorize_ is now known as leorize |
16:55:03 | * | disrupteq quit (Ping timeout: 265 seconds) |
17:04:47 | PMunch | Uh oh, all the avatars on the forums are broken |
17:04:56 | Yardanico | not for me |
17:05:00 | Yardanico | ah nvm they are |
17:05:06 | Yardanico | or not |
17:05:10 | PMunch | "Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID" |
17:05:39 | PMunch | Haha, seems like Gravatar messed up their certs :P |
17:05:54 | PMunch | I get the same error if I try to go to their site |
17:06:07 | Yardanico | forgot to update the cert? |
17:06:10 | Yardanico | renew* |
17:06:14 | PMunch | Probably |
17:06:45 | PMunch | Huh, apparently not: Sunday, September 6, 2020 at 1:59:59 AM |
17:06:53 | PMunch | That is their expiry date |
17:07:02 | Yardanico | what lol |
17:07:16 | Yardanico | ah nvm, I forgot we're in 2020, thought it said sep 2019 |
17:07:57 | * | endragor joined #nim |
17:08:41 | PMunch | Hmm, seems like their CA has the same issue.. |
17:08:43 | * | endragor quit (Remote host closed the connection) |
17:09:24 | FromGitter | <kaushalmodi> Does anyone have pointers on how to call C# built libraries in Nim? |
17:09:47 | PMunch | Look at how you can do it in C and apply that |
17:09:58 | FromGitter | <kaushalmodi> I google and found the other way around approach (i.e. calling Nim built dll's in C#) but I am not looking for that |
17:10:26 | Yardanico | seems like it won't be easy since C# is a managed language with it's own VM |
17:10:27 | Yardanico | https://stackoverflow.com/questions/778590/calling-c-sharp-code-from-c |
17:10:33 | Yardanico | that's for C# from C++ |
17:11:06 | FromGitter | <kaushalmodi> Yardanico: Thanks. I will start reading |
17:11:49 | Zevv | For practical reasos I'd like to compile the nim-generated C sources as a single translation unit, but if I concatenate all .c files I get duplicate declarations. Is there a trick to get this done somehow? |
17:12:26 | Yardanico | I've found https://people.eecs.berkeley.edu/~necula/cil/merger.html |
17:12:31 | Yardanico | idk if that's useful though |
17:12:43 | Yardanico | it's made for https://github.com/cil-project/cil |
17:21:40 | leorize | Zevv: get rid of most of the externs in C files :P |
17:21:59 | PMunch | Why do you want to do that? |
17:26:37 | FromDiscord_ | <Rika> i'm getting an error in a macro i made, just says "not unused" and i'm very confused |
17:26:51 | PMunch | It just says "not unused"? |
17:27:06 | Yardanico | can you give full compiler log? :P |
17:28:32 | FromDiscord_ | <Rika> how? just copy? |
17:28:33 | FromDiscord_ | <Rika> https://gist.github.com/de-odex/c819415b62acd702fabd191a599f805a |
17:28:44 | Yardanico | lol |
17:29:01 | Yardanico | well, it's a VM error |
17:29:16 | Yardanico | compiler/vmgen.nim 473 |
17:29:37 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/compiler/vmgen.nim#L473 |
17:30:29 | Yardanico | there were two nim issues with same error message but they were closed, can you give a macro? |
17:30:36 | Yardanico | well, I mean can you share your macro code? |
17:30:41 | FromDiscord_ | <Rika> i'd expect that, it errored in a macro aftera ll |
17:31:31 | FromDiscord_ | <Rika> uh |
17:31:50 | FromDiscord_ | <Rika> i cant minimize it as i dont know where the hell the issue is, is that fine? |
17:31:59 | Yardanico | well yeah, I can try to poke around :P |
17:32:45 | FromDiscord_ | <Rika> also it's hell |
17:33:03 | Yardanico | its okay |
17:33:11 | Yardanico | dont be shy |
17:33:41 | FromDiscord_ | <Rika> ill send it in a moment, my internet is legitimately acting up |
17:40:14 | * | tane joined #nim |
17:42:26 | Zevv | PMunch: I'm trying to hack in nim into this arduino stuff |
17:42:57 | Zevv | I'm making a thing that sits in place of the compiler, tries to deduce from the arguments passed what is happenng and tells the proper lies to get this all done. |
17:42:57 | disruptek | Zevv: if you can do that it would help nigel tremendously. |
17:43:09 | disruptek | i mean, concat'ing c. |
17:43:13 | * | abm quit (Ping timeout: 260 seconds) |
17:43:22 | disruptek | but i doubt you can. no offense. |
17:43:27 | Zevv | but arduino throws the generated C file through the C preprocessor with some flags to collect info, and that doesn't work when there is more then one file |
17:43:48 | Zevv | disruptek: well, I could but it's pretty hefty. Mostly double definitions of types |
17:43:56 | PMunch | Aaah |
17:44:04 | disruptek | why don't you run the preprocessor yourself and have it output everything? |
17:44:15 | PMunch | What kind of info does it try to collect? |
17:44:41 | Zevv | Not sure. it tells me it is "detecting used libraries" and "generating function prototypes" |
17:44:52 | FromDiscord_ | <Rika> https://gist.github.com/de-odex/9259f8fccef94cf66eb914d6c894e5cc |
17:44:58 | disruptek | all that, huh? |
17:45:00 | disruptek | sounds amazing. |
17:45:38 | Yardanico | @Rika and how to call that macro ? with what code? |
17:45:39 | FromDiscord_ | <Rika> Yardanico |
17:45:46 | Zevv | but good idea, I run multiple CPP's, just concat the output and give that back |
17:45:50 | Yardanico | ah nvm |
17:45:53 | disruptek | yes. |
17:45:56 | Yardanico | it errors even with simple echo "hello world" usage |
17:45:58 | Zevv | smart boi |
17:46:13 | disruptek | dude i think ima build the cloud-kernel i always wanted. |
17:46:23 | disruptek | i think that's what nigel is gonna become. |
17:47:15 | Yardanico | @Rika as funny as it is, try to add something like "discard prototype.kind" on the line before # make sure you start with a type definition, or else... |
17:47:20 | FromDiscord_ | <Rika> Yardanico, you use it like making a type except you add a colon after dType and after the type name, then omit the equals sign and the word object. No asterisks |
17:47:26 | Yardanico | idk why that helps though, but it seems to start working XD |
17:47:50 | PMunch | Zevv yeah running multiple could work |
17:48:05 | Yardanico | https://gist.github.com/Yardanico/87b1ec0fc31cb3c242a477dcf3267edc/revisions |
17:48:11 | FromDiscord_ | <Rika> Huh? |
17:48:15 | Yardanico | it works for you? |
17:48:33 | FromDiscord_ | <Rika> Can't test it now |
17:48:36 | FromDiscord_ | <Rika> I will tomorrow |
17:48:40 | FromDiscord_ | <Rika> Thanks |
17:49:36 | FromDiscord_ | <Rika> I will leave now, it is late. Good night |
17:49:59 | FromDiscord_ | <Recruit_main_70007> here it is 18:49 :D, good night |
17:50:05 | * | nsf joined #nim |
17:51:06 | PMunch | Recruit_main_70007, yeah time-zone buddies! |
17:51:21 | Yardanico | 20:50 here, also @Rika i've minimized your code and will post it as an issue |
17:51:50 | FromDiscord_ | <Recruit_main_70007> Pmunch are you spanish? |
17:51:58 | PMunch | Nope, are you? |
17:52:11 | FromDiscord_ | <Recruit_main_70007> ye |
17:52:16 | PMunch | I'm Norwegian |
17:52:55 | FromDiscord_ | <Recruit_main_70007> isnt that a bit far away for having the same time-zone? |
17:54:04 | PMunch | Yes, but you are the odd ones here: https://www.timeanddate.com/time/map/ |
17:54:28 | PMunch | Norway is pretty much smack in the middle of UTC+1 |
17:54:41 | FromDiscord_ | <Recruit_main_70007> cool |
17:54:52 | PMunch | Spain is all the way to the west in what would normally be UTC |
17:54:57 | * | Trustable quit (Remote host closed the connection) |
17:55:03 | PMunch | Bordering on UTC-1 |
17:56:56 | FromDiscord_ | <Yardanico> @Rika https://github.com/nim-lang/Nim/issues/13296 |
17:56:59 | disbot | ➥ Error: not unused with a macro ; snippet at 12https://play.nim-lang.org/#ix=28Ee |
17:58:04 | PMunch | Turns out having the same time zone as your most important financial links makes sense |
18:00:16 | FromDiscord_ | <Rika> Now look at China's timezone lol |
18:00:31 | Yardanico | well at least they don't have to bother with time difference in the country lol |
18:00:36 | Yardanico | look at russia :D |
18:00:44 | Yardanico | eleven timezones |
18:02:32 | PMunch | And some are almost entirely outside the timezone that their supposed to be in :P |
18:02:40 | Yardanico | that's true as well |
18:02:56 | PMunch | Then you have Wesh Sahara and Morocco :P |
18:03:03 | PMunch | Or New Zealand for that matter |
18:04:16 | PMunch | Russias UTC+4 time zone is also pretty odd, a small part of it is disconnected from the rest, separated by a UTC+3 timezone :P |
18:04:32 | * | ptdel quit (Ping timeout: 260 seconds) |
18:06:42 | Yardanico | PMunch: also for example I live in Tatarstan (near Kazan), and it would be better if it were in UTC+4 or at least UTC+3:30 than UTC+3 |
18:07:07 | Yardanico | but on the other side I have same time as Moscow and half of russian's population |
18:07:50 | * | floppydh quit (Quit: WeeChat 2.7) |
18:09:22 | PMunch | Yeah that's handy |
18:10:18 | * | ptdel joined #nim |
18:10:21 | PMunch | I just live in the strange part of the world where time of day is slightly irrelevant since the sun is either up or down for months at a time :P |
18:10:26 | * | sagax quit (Remote host closed the connection) |
18:10:34 | Yardanico | PMunch: ohh |
18:10:42 | * | ptdel quit (Client Quit) |
18:11:22 | PMunch | Right now we're in the transition period, but the sun set around 2 today |
18:14:28 | * | uvegbot quit (Ping timeout: 245 seconds) |
18:15:19 | * | zyklon joined #nim |
18:18:23 | leorize | disruptek: just fixed that long doc issue |
18:18:47 | disruptek | ah nice, i wasn't even 100% sure it wasn't my end. |
18:19:06 | PMunch | disruptek, just found this post on the forums again: https://forum.nim-lang.org/t/5509 |
18:19:23 | PMunch | Chinese chip-maker that makes Bluetooth LE chips and provides Nim SDKs |
18:19:32 | PMunch | Perfect fit for your business card idea :) |
18:20:02 | disruptek | seems like they would probably provide free hardware if we provide exposure/software. |
18:21:14 | PMunch | I mean that would be amazing, as of right now I can't find their chips available for direct sales anywhere |
18:21:31 | disruptek | early days... |
18:21:42 | disruptek | ~motd |
18:21:43 | disbot | motd: 11recommend your favorite book on kernel design -- disruptek |
18:21:46 | disruptek | c'mon people... |
18:21:53 | disruptek | surely someone has an opinion. |
18:22:41 | Yardanico | ask in ##linux :D |
18:22:52 | disruptek | i'm no masochist. |
18:23:14 | disruptek | i'm looking for something very much theoretical. |
18:23:17 | FromDiscord_ | <treeform> NimStart, "Any reasons why simple app with text box consumes 30% CPU" I probably forgot to put a sleep some place... |
18:23:19 | rayman22201 | Araq had some good ones |
18:23:22 | rayman22201 | the Oberon book |
18:23:38 | disruptek | yeah, that's on my list. |
18:23:52 | FromDiscord_ | <treeform> I use it mostly for games and web. Games render their screen at 144ps, that is probably what it's doing. |
18:24:08 | Yardanico | maybe it's limited by vsync at all |
18:24:17 | FromDiscord_ | <treeform> On the web its more efficient. |
18:26:42 | rayman22201 | In college I used the Tanenbaum book. It wasn't bad |
18:27:15 | rayman22201 | https://www.amazon.com/Modern-Operating-Systems-Andrew-Tanenbaum/dp/013359162X/ref=sr_1_1?keywords=tanenbaum&qid=1580322427&sr=8-1 |
18:27:42 | disruptek | yeah, i read that long ago. the minix one. |
18:27:49 | rayman22201 | yeah |
18:29:02 | disruptek | oh it was revised again in 2014. |
18:29:33 | PMunch | Araq, are you going to talk about --gc:arc in your FOSDEM talk? |
18:29:33 | rayman22201 | I have my old 3rd edition. I keep it around for reference. I rarely use it though. |
18:29:49 | disruptek | !repo araq/fosdem2020 |
18:29:50 | disbot | https://github.com/Araq/fosdem2020 -- 9fosdem2020: 11Slides and source code for my FOSDEM 2020 talk "Nim - Move semantics". 15 16⭐ 1🍴 |
18:30:07 | Araq | PMunch: yeah |
18:30:33 | PMunch | Okay, cool. Then I wont spend much time on that |
18:31:12 | PMunch | Huh, I get a cert error for Amazon as well.. |
18:31:46 | rayman22201 | I do wish you could buy from that Chinese bluetooth company. I would buy some just to support Nim hardware in principle lol |
18:33:11 | disruptek | these old nimdoc assets render so much better than current ones, for me: https://rawgit.com/akiradeveloper/nim-fuse/master/fuse.html |
18:33:35 | Yardanico | because the font/text size is different? |
18:33:40 | disruptek | probably. |
18:34:27 | PMunch | Those look terrible for me disruptek |
18:34:55 | disruptek | i figured. it seems i never have similar display requirements to others. |
18:35:31 | * | sagax joined #nim |
18:35:37 | * | sagax quit (Client Quit) |
18:35:57 | Yardanico | also I pushed my performance with to nim-mathexpr so that the seq of args is only set once :P https://github.com/Yardanico/nim-mathexpr/commit/3de8ff34215354abe298fb30d9454b94d44022b8 |
18:36:11 | Yardanico | also I wonder if it's okay to write of branches like of "acos": checkArgs(); acos(arg[0]) |
18:36:16 | Yardanico | I mean the usage of ";" |
18:36:20 | Yardanico | to write 1 line instead of 3 |
18:38:55 | * | abm joined #nim |
18:43:17 | Yardanico | or maybe I should just write a simple template/macro :P |
18:44:53 | * | silvernode joined #nim |
18:46:13 | * | sagax joined #nim |
18:47:44 | FromGitter | <Vindaar> @narimiran the test failure on windows is really weird. Also fails locally. But the error only happens on one file (`tests.nim`) and only if it's compiled and run directly. Compiling first and running later works perfectly fine. |
18:49:29 | FromGitter | <Vindaar> doesn't help that there's no error aside from "execution of an external program failed" |
18:49:47 | * | marmotini_ joined #nim |
18:55:07 | Araq | Vindaar: out of memory? |
18:57:39 | FromGitter | <Vindaar> @Araq: I don't see why. But I just realized that when running the test afterwards it's also failing but just silently.. |
18:58:11 | Araq | stack overflow? |
18:59:22 | * | seni joined #nim |
18:59:22 | FromGitter | <Vindaar> But if oom or stack overflow happen Nim writes that as an error, no? |
19:00:06 | Yardanico | not in release mode though probably |
19:00:20 | * | seni quit (Remote host closed the connection) |
19:00:34 | FromGitter | <Vindaar> Ok, yeah maybe. Test is compiled in debug of course though |
19:02:51 | PMunch | Crap, I can't remember how I set LibreOffice up to use Dracula.. |
19:03:28 | * | Vladar quit (Quit: Leaving) |
19:15:35 | FromGitter | <Vindaar> ok, with gdb I figured out it's just a segfault. Might be running into this: https://stackoverflow.com/questions/23392755/application-segmentation-fault-only-when-compiling-on-windows-with-mingw ⏎ This is gonna be a fun one, I can feel it :P |
19:19:27 | * | ptdel joined #nim |
19:19:38 | * | marmotini_ quit (Remote host closed the connection) |
19:21:51 | * | marmotini_ joined #nim |
19:23:03 | * | marmotini_ quit (Remote host closed the connection) |
19:25:19 | * | marmotini_ joined #nim |
19:25:19 | * | marmotini_ quit (Remote host closed the connection) |
19:25:36 | * | marmotini_ joined #nim |
19:31:34 | * | marmotini_ quit (Remote host closed the connection) |
19:34:11 | * | marmotini_ joined #nim |
19:34:28 | * | marmotin_ joined #nim |
19:34:55 | * | marmotini_ quit (Remote host closed the connection) |
19:35:21 | PMunch | FFS, why is this so hard.. |
19:35:27 | * | nsf quit (Quit: WeeChat 2.7) |
19:43:26 | PMunch | Okay, got a brittle setup now.. Which meant overriding one of the default styles.. |
19:43:50 | PMunch | That was a good 45 minutes wasted.. |
19:50:32 | * | couven92 joined #nim |
19:52:03 | * | neceve quit (Remote host closed the connection) |
20:02:24 | * | marmotin_ quit (Remote host closed the connection) |
20:35:05 | * | disrupteq joined #nim |
20:38:44 | * | narimiran quit (Ping timeout: 268 seconds) |
20:48:04 | * | PMunch quit (Quit: leaving) |
20:54:52 | * | ptdel quit (Ping timeout: 260 seconds) |
20:58:09 | * | couven92 quit (Read error: Connection reset by peer) |
20:58:38 | * | couven92 joined #nim |
21:16:23 | * | Pqzcih5 quit (Ping timeout: 240 seconds) |
21:17:55 | * | Pqzcih5 joined #nim |
21:21:22 | * | silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
21:21:59 | * | lritter quit (Remote host closed the connection) |
21:23:40 | * | ptdel joined #nim |
21:24:36 | FromGitter | <Varriount> PMunch: Does LibreOffice still require arcane rituals in order to behave? |
21:24:52 | * | NimBot joined #nim |
21:25:51 | disruptek | ah arcane rituals. there's something so comforting about naivety; a warm blanket of ignorance that suggests that anything is possible, or even likely. masturbation as religion, baby. |
21:25:59 | disruptek | now that's what i'm talking about. |
21:27:52 | lqdev[m] | @Varriount yes it does. I remember doing a spreadsheet recently, kept resetting my fonts until I restarted it |
21:27:59 | lqdev[m] | and the default font choice is horrendous |
21:30:12 | FromDiscord_ | <Recruit_main_70007> input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; |
21:30:12 | FromDiscord_ | <Recruit_main_70007> |
21:30:12 | FromDiscord_ | <Recruit_main_70007> why is | not working in Nim (above code is C) |
21:30:25 | * | m|b_ joined #nim |
21:30:36 | disruptek | nim is not c? |
21:31:11 | Yardanico | @Recruit_main_70007 because you need to use "or" in Nim |
21:31:23 | Yardanico | nim doesn't have | operator |
21:31:27 | FromDiscord_ | <Recruit_main_70007> ok |
21:34:29 | nisstyre | you can do x.bitor(y) as well from the bitops module, but TBH I'm not actually sure what the difference is |
21:34:48 | nisstyre | is it that bitor uses SomeInteger ? |
21:35:21 | nisstyre | ah yeah, looks like `or` is for int |
21:35:37 | * | filcuc joined #nim |
21:35:54 | nisstyre | so if you need it to work for unsigned ints as well then use bitor |
21:37:53 | FromDiscord_ | <Recruit_main_70007> ok |
21:46:35 | FromDiscord_ | <exelotl> bruh |
21:46:35 | FromDiscord_ | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/672195907810361359/unknown.png |
21:51:37 | FromDiscord_ | <Generic> welcome to ctr land |
21:52:04 | * | ptdel quit (Ping timeout: 248 seconds) |
21:52:23 | FromGitter | <zetashift> is that Nim on the 3DS? \o/ |
21:52:41 | FromDiscord_ | <exelotl> yeah was really easy to get running :D |
21:52:57 | FromGitter | <zetashift> that is great to hear !! |
21:53:40 | FromDiscord_ | <exelotl> is anyone else doing this? |
21:53:49 | FromDiscord_ | <Generic> I think someone did this years ago |
21:54:01 | FromDiscord_ | <exelotl> I found some ctrulib bindings but they're 4 years old |
21:54:07 | FromDiscord_ | <Generic> I tried it myself once, but lost interest |
21:55:13 | FromGitter | <zetashift> For the 3DS? Not that I know of, I do know about a year ago Nimw as able to run on the Switch |
21:56:25 | FromDiscord_ | <exelotl> I'm still using --os:standalone --gc:none which runs on literally anything, curious to see if other gcs will run |
21:56:35 | FromDiscord_ | <exelotl> especially arc |
21:58:36 | FromDiscord_ | <Generic> the switch os is based on the 3ds os |
21:58:55 | * | sagax quit (Read error: Connection reset by peer) |
22:00:12 | FromDiscord_ | <Generic> so in theory atleast parts of the os integration for the switch should only need small modifications for the 3ds |
22:00:38 | * | ptdel joined #nim |
22:03:07 | * | couven92 quit (Read error: Connection reset by peer) |
22:03:34 | * | couven92 joined #nim |
22:16:30 | * | lritter joined #nim |
22:23:45 | * | tane quit (Quit: Leaving) |
22:32:55 | FromDiscord_ | <treeform> In theory --gc:arc should run anywhere --gc:none runs now. |
22:33:40 | disruptek | dude. |
22:33:49 | disruptek | let's build a kernel that runs on aws lambda. |
22:33:56 | FromDiscord_ | <treeform> I want to see how --gc:arc runs on android on iOS. |
22:34:12 | FromDiscord_ | <treeform> and* |
22:35:24 | FromDiscord_ | <Recruit_main_70007> any free references to building kernels (possibly in nim, but i dont care), and cross platform or windows, because i see most guides are on linux |
22:36:08 | disruptek | both dom and alehander have poc nim kernels. |
22:36:15 | FromDiscord_ | <treeform> I would like to make a library os/Unikernel in nim, sort of like includeos. |
22:36:42 | disruptek | yep. |
22:37:18 | disruptek | it only needs a very few primitives and i have most of it done. |
22:37:44 | FromDiscord_ | <treeform> The ring0 switching costs are huge in modern operating systems. |
22:37:55 | FromDiscord_ | <treeform> More performance and less things to crash and go wrong. |
22:38:17 | disruptek | i honestly don't care about performance. |
22:38:27 | FromDiscord_ | <treeform> Recently I been experimenting with Alpine Linux - which is as minimal as one can get it looks like. |
22:38:33 | FromDiscord_ | <treeform> And still ship useful software. |
22:39:02 | disruptek | i played with it when i was into docker. it works great. i have my nlvm-klee setup running on alpine. |
22:39:16 | disruptek | but i want to go smaller. |
22:39:25 | FromDiscord_ | <treeform> I am not a huge fan of docker. I want to run alpine on bare metal. |
22:40:01 | disruptek | seems imaterial to me. |
22:40:12 | disruptek | i just want to program in the cloud. |
22:40:15 | FromDiscord_ | <treeform> I am all about removing layers and removing things. |
22:40:43 | FromDiscord_ | <treeform> Having programmer in the cloud my entire life I want to come down to base hardware 🙂 |
22:40:51 | shashlick | vscode remote doesn't support alpine yet, else it would be a awesome |
22:40:55 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:41:00 | disruptek | agree, but you can have it both ways. |
22:41:17 | FromDiscord_ | <treeform> well I don't think any cloud provider allows their own OS. |
22:41:38 | FromDiscord_ | <treeform> GCP does not support alpine linux for example. |
22:41:39 | * | filcuc quit (Quit: Konversation terminated!) |
22:41:48 | FromDiscord_ | <treeform> I ran alpine on Digital Ocean. |
22:42:13 | disruptek | i see your point now. |
22:42:53 | FromDiscord_ | <exelotl> --gc:arc seems to work great! |
22:42:53 | FromDiscord_ | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/672210077075243058/unknown.png |
22:42:55 | disruptek | but i guess i got confused because i thought includeos was cloud-based. |
22:43:37 | FromDiscord_ | <treeform> Idea behind includeos is its just headers you include with your program that make it an OS. |
22:44:10 | FromDiscord_ | <treeform> https://github.com/includeos/IncludeOS |
22:45:08 | disruptek | okay, that makes some sense now. |
22:45:15 | disruptek | that's not at all what i want. |
22:45:16 | FromDiscord_ | <treeform> wow they seem to have figured this out: https://www.includeos.org/blog/2017/includeos-on-google-compute-engine.html |
22:46:01 | FromDiscord_ | <treeform> ^ I did not know this was possible that is really cool |
22:46:27 | * | ltriant joined #nim |
22:47:21 | disruptek | i'm talking about writing nim with cloud primitives like S3Object() and SqsQueue(). not only that, but the runtime is attached directly to resources in the cloud. so when you operate on the code at runtime, you are actually twiddling the cloud in real time. |
22:47:40 | disruptek | this is the idea that brought me to nim, btw. |
22:47:53 | disruptek | i was just looking through my notes about this today. kinda funny. |
22:49:25 | disruptek | the key idea is that we have a REPL loop for cloud services that goes, URL -> S3 -> Lambda -> S3. |
22:49:52 | disruptek | sprinkle some input in there, too, for good measure. |
22:51:30 | disruptek | so your lambda code can be includeos-based, if it helps. that will certainly accelerate things. |
22:54:11 | FromDiscord_ | <Clyybber> @exelotl nice dude |
22:57:01 | FromDiscord_ | <exelotl> :D |
22:58:58 | * | ftsf joined #nim |
22:59:03 | FromDiscord_ | <Clyybber> @exelotl did you try os:any too? |
22:59:34 | FromDiscord_ | <exelotl> nope, don't know anything about it |
22:59:56 | FromDiscord_ | <exelotl> what is it? |
22:59:58 | Zevv | bwah does optparser not support quoted values with white space in them? |
23:00:24 | FromDiscord_ | <Clyybber> @exelotl Give it malloc and it gives you seqs strings and refs : ) |
23:01:34 | FromDiscord_ | <Clyybber> Zevv made it |
23:02:19 | Zevv | but zevv is too stupid to parse --cflags:"-c -Wall -flto" |
23:02:53 | FromDiscord_ | <Clyybber> heh |
23:02:55 | disruptek | i do this in nimph's bootstrap i think. |
23:03:22 | disruptek | oh i guess not. |
23:03:33 | disruptek | did you escape the quote? |
23:03:44 | Zevv | of course not |
23:04:12 | disruptek | multiple --cflags? |
23:04:27 | Zevv | no can do, orders from higher up |
23:04:34 | Zevv | but I'm fine. I can write parsers |
23:04:40 | Zevv | just wanted to whine a bit |
23:06:17 | FromDiscord_ | <Clyybber> @exelotl This contains a bit more information: https://nim-lang.github.io/Nim/nimc.html#nim-for-embedded-systems |
23:06:51 | FromDiscord_ | <Clyybber> but if it works ootb as is I guess you don't have to use it |
23:07:45 | FromDiscord_ | <exelotl> `echo` didn't work with os:standalone, maybe it will with os:any |
23:08:14 | FromDiscord_ | <Clyybber> nice |
23:10:11 | FromDiscord_ | <Clyybber> so you could theoretically have seqs and stuff on the gba too |
23:10:17 | FromDiscord_ | <Clyybber> assuming you provide a malloc free |
23:10:51 | Zevv | exolotl: it does, it requires stdout though |
23:11:03 | Zevv | but that is trivially stubbably if you need to |
23:11:25 | Zevv | I use this to run inside the linux kernel: https://github.com/zevv/nim-linux-kernel/blob/master/src/stubs/stubs.c |
23:11:33 | rayman22201 | @disruptek, the morning paper today shows a very similar idea to what you propose: https://blog.acolyer.org/2020/01/29/narrowing-the-gap/ |
23:13:14 | disruptek | ah, that's similar, but i'm talking about something a little more bare-cloud-metal if you will. |
23:13:33 | rayman22201 | they used V8 (JS yuck) and attached it to S3, but similar ideas |
23:14:18 | rayman22201 | It's actually pretty bare metal if you look at the paper |
23:14:26 | disruptek | this would basically treat the cloud scope in which it runs as an operating system. |
23:14:33 | rayman22201 | They use Seastar, and the V8 stuff is mainly for sandboxing |
23:14:56 | disruptek | this will, like, unpack itself into the cloud and then run. |
23:15:30 | rayman22201 | seastar is a multithreading runtime, but can act like an OS if you squint hard enough |
23:16:42 | rayman22201 | how bare-cloud are you talking? you can only go so far unless you control the actual hardware |
23:16:57 | disruptek | i'm pretty sure i don't agree. |
23:17:24 | disruptek | i have in mind a marketplace where you can buy net-scale service from members of the marketplace. |
23:17:26 | rayman22201 | You will never get access to a physical box in AWS... not without paying a lot of money |
23:17:33 | rayman22201 | you will get a VM |
23:17:35 | disruptek | why would i need it? |
23:18:00 | rayman22201 | idk? you said bare-metal? |
23:18:12 | rayman22201 | I don't know what bare-metal means to you. It's a vague term |
23:18:22 | disruptek | what i mean is, closer to the cloud. i was trying to draw an analogy. |
23:18:34 | disruptek | the semantics of the cloud. |
23:18:40 | rayman22201 | idk what "closer to the cloud" means either :-P |
23:19:00 | rayman22201 | but then again, I don't do a lot of cloud stuff. |
23:19:03 | disruptek | today i can write a piece of nim and run it in the cloud. |
23:19:15 | disruptek | the nim i write can also talk to the cloud. |
23:19:32 | disruptek | the nim i write can, say, replicate itself. invoke itself in the cloud. |
23:19:42 | disruptek | write some data into the cloud. |
23:19:54 | disruptek | read some data from, y'know, anywhere on the net. |
23:20:38 | disruptek | i want to write nim that knows it's running in the cloud and can communicate with the cloud entities as first-class objects. |
23:20:45 | rayman22201 | you can do that today already? your openAPI stuff |
23:21:03 | disruptek | want a peta-byte of "memory"? no problem. |
23:21:35 | disruptek | yeah, that's what i'm saying. i have this kernel idea almost completely done. |
23:22:20 | rayman22201 | oh... reminds me of this paper also: https://blog.acolyer.org/2019/12/09/a-persistent-problem/ |
23:23:03 | disruptek | wtf is nvm? |
23:23:17 | rayman22201 | non-volatile memory |
23:23:30 | rayman22201 | as fast as ram, but still works when you cut power |
23:23:46 | disruptek | wow. |
23:23:54 | disruptek | that's game-changer. |
23:23:57 | rayman22201 | super experimental and expensive still |
23:24:03 | rayman22201 | but I predict will get cheaper |
23:24:03 | rayman22201 | yeah |
23:24:22 | FromDiscord_ | <exelotl> woah |
23:24:28 | disruptek | when you say, "super expensive" what are we talkin'? |
23:25:24 | FromDiscord_ | <exelotl> welp, --os:any fails at the C stage with "Nim_and_C_compiler_disagree_on_target_architecture" which seems odd |
23:25:32 | rayman22201 | as in, unless you are a researcher at Intel or some big Chip manufacturer I don't think you can get it right now |
23:25:49 | disruptek | this could be incredible, ray. |
23:25:51 | rayman22201 | but they are already releasing research papers about it |
23:26:02 | disruptek | you could run software on all computers at once, all the time. |
23:26:47 | FromDiscord_ | <exelotl> -d:useMalloc makes a big difference even with --os:standalone though |
23:27:30 | FromDiscord_ | <exelotl> I have `var list = @[5, 10, 15, 20]; list.add(25)` |
23:27:56 | FromDiscord_ | <exelotl> if I don't have -d:useMalloc, the list gets zeroed as soon as I push 25 to it |
23:28:24 | FromDiscord_ | <exelotl> not sure what shonky business is going on there |
23:38:03 | * | opal quit (Ping timeout: 240 seconds) |
23:41:25 | * | opal joined #nim |
23:44:45 | * | m|b_ quit (Quit: Connection closed for inactivity) |