00:01:42 | bozaloshtsh | would simply piping /dev/null to the executable be an option? |
00:02:13 | zachcarter | I could certainly try that |
00:02:36 | zachcarter | and I will now :) |
00:02:51 | zachcarter | one more css tweak first though |
00:05:57 | FromGitter | <Varriount> Hm. Should https://play.nim-lang.org be down? |
00:08:01 | * | BennyElg quit (Ping timeout: 240 seconds) |
00:08:56 | zachcarter | http://play.nim-lang.org/ |
00:09:03 | zachcarter | Varriount: cloudflare is down |
00:09:15 | zachcarter | Varriount: PM Inc |
00:09:17 | FromGitter | <barcharcraz> again |
00:09:28 | zachcarter | no dom96 turned it off |
00:09:34 | zachcarter | for the website |
00:09:36 | FromGitter | <barcharcraz> oh |
00:09:38 | zachcarter | to prevent caching |
00:09:48 | zachcarter | so we can beta test with everyone |
00:11:24 | * | BennyElg joined #nim |
00:20:07 | * | vlad1777d quit (Quit: Leaving) |
00:20:43 | * | PMunch quit (Quit: leaving) |
00:32:57 | ftsf | dom96, i know! i'm happily shocked ;) |
00:36:40 | zachcarter | yeah that tweet is crazy lol |
00:36:51 | zachcarter | but your game is awesome so I’m not surprised |
00:38:37 | * | xaxisx joined #nim |
00:39:33 | * | xaxisx_ joined #nim |
00:44:36 | * | xaxisx_ quit (Ping timeout: 260 seconds) |
00:45:04 | * | xaxisx quit (Ping timeout: 260 seconds) |
00:54:27 | * | zachcarter quit (Read error: Connection reset by peer) |
00:54:49 | * | zachcarter joined #nim |
00:59:11 | * | fredrik92 joined #nim |
00:59:32 | * | couven92 quit (Disconnected by services) |
00:59:41 | * | fredrik92 is now known as couven92 |
01:14:16 | ftsf | zachcarter, cheers <3 |
01:14:33 | ftsf | hopefully will bring some notoriety to nim ;) |
01:14:48 | zachcarter | would be awesome |
01:15:00 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:15:52 | FromGitter | <Varriount> Don't forget a blog post we can submit to hacker news and reddit |
01:15:59 | ftsf | good idea |
01:16:10 | ftsf | i never really use reddit or hn forget they exist |
01:20:20 | * | rauss joined #nim |
01:20:22 | FromGitter | <Varriount> ftsf: But they never forget that *you* exist. >:D |
01:28:34 | * | chemist69 joined #nim |
01:35:16 | * | zachcarter quit (Quit: zachcarter) |
01:43:24 | * | BennyElg quit (Ping timeout: 240 seconds) |
01:43:41 | * | BennyElg joined #nim |
01:48:57 | * | dddddd quit (Remote host closed the connection) |
01:51:20 | * | BennyElg quit (Ping timeout: 260 seconds) |
01:58:39 | * | brson quit (Quit: leaving) |
02:11:12 | * | couven92 quit (Quit: Client Disconnecting) |
02:31:45 | * | tigerfinch quit (Quit: Leaving.) |
02:48:06 | * | krux02 quit (Remote host closed the connection) |
03:14:53 | * | BennyElg joined #nim |
04:02:08 | * | BennyElg_ joined #nim |
04:02:28 | * | BennyElg quit (Ping timeout: 260 seconds) |
04:43:03 | * | adeohluwa joined #nim |
04:50:38 | tyler569 | if I don't intend to use inheritance or dynamic dispatch, is there any functional difference between tuples and objects? |
04:59:40 | * | tigerfinch joined #nim |
05:11:08 | * | libman quit (Quit: Connection closed for inactivity) |
05:42:54 | * | tstm quit (Ping timeout: 246 seconds) |
05:51:59 | * | BennyElg joined #nim |
05:52:36 | * | BennyElg_ quit (Ping timeout: 260 seconds) |
06:07:17 | * | acidx quit (Quit: Lost terminal) |
06:12:21 | * | Lord_Nightmare2 joined #nim |
06:12:52 | * | acidx_ joined #nim |
06:13:55 | * | Lord_Nightmare quit (Ping timeout: 252 seconds) |
06:13:55 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
06:28:14 | * | zachcarter joined #nim |
06:30:26 | Araq | tyler569: rule of thumb: if you have more than 3 fields use an object |
06:31:27 | * | jackv quit (Quit: ZNC - 1.6.0 - http://znc.in) |
06:33:03 | zachcarter | dom96: if you’re around lmk what you think of the design / turning back on cloudflare |
06:42:05 | * | nsf joined #nim |
06:42:59 | * | acidx_ is now known as acidx |
06:44:58 | zachcarter | bozaloshtsh: stdin should be redirected to /dev/null now |
06:47:58 | * | rauss quit (Quit: WeeChat 1.7.1) |
06:48:58 | * | yglukhov joined #nim |
06:49:06 | ftsf | hmm continue cannot have a label =( |
06:51:08 | zachcarter | huh? |
06:51:22 | * | BennyElg quit (Ping timeout: 255 seconds) |
06:51:26 | ftsf | break <label> works, but continue <label> is not allowed |
06:51:53 | zachcarter | in what context? |
06:51:59 | ftsf | i'm most surprised the error message understood what I was trying to do though |
06:52:16 | ftsf | trying to continue an outer loop from an inner loop |
06:52:22 | zachcarter | oh I see |
06:52:42 | zachcarter | ftsf: did you see the nim playground thing? |
06:53:10 | ftsf | zachcarter, i didn't |
06:53:17 | zachcarter | http://play.nim-lang.org/ |
06:54:53 | ftsf | hmm the editor inserts tabulators =\ |
06:54:58 | ftsf | that's gonna be dangerous with nim |
06:55:01 | zachcarter | yeah :/ it’s in python mode |
06:55:24 | zachcarter | that reminds me I’ll work on making a nim mode now |
06:55:41 | ftsf | great idea though |
06:56:08 | zachcarter | was my co-workers complaint |
06:56:27 | zachcarter | only took a weekend to build the backend, the front end took most of this week but that’s because it was a lot of new tech for me |
06:56:33 | ftsf | ^_^ |
06:56:52 | ftsf | hope it's sandboxed nicely |
06:56:59 | zachcarter | runs in a docker image |
06:57:12 | zachcarter | with no network access |
06:57:26 | ftsf | killed after certain amount of runtime? |
06:57:28 | zachcarter | 20s |
06:57:46 | ftsf | i'd limit it to 1s at most |
06:58:12 | zachcarter | not sure that will be enough time for the docker container to boot and compile |
06:58:14 | ftsf | if lots of people are using it (or one person is abusing it), it'll get bottlenecked quickly |
06:58:32 | ftsf | i mean 1 second of runtime for the compiled code |
06:58:44 | ftsf | but yeah that's a good point |
06:58:47 | ftsf | compilation takes time too |
06:58:57 | zachcarter | the timeout limit is ont he docker process itself |
06:59:01 | zachcarter | I don’t set a timeout on the binary execution time |
06:59:06 | ftsf | does it use a job queue? |
06:59:10 | zachcarter | nope |
06:59:40 | ftsf | i'd suggest that as the next improvement. each job should be queued and then executed when there's a worker available. |
06:59:50 | zachcarter | it uses thread pooling |
06:59:55 | zachcarter | and async |
07:00:43 | zachcarter | I could do that |
07:01:00 | ftsf | mmm i haven't used that stuff much, i guess it does mostly the same thing |
07:01:04 | zachcarter | yeah |
07:01:06 | zachcarter | I think it does |
07:01:23 | * | BennyElg joined #nim |
07:05:11 | hlt | how can i get pdflatex on ubuntu? for ./koch pdf |
07:05:33 | * | gokr joined #nim |
07:05:49 | zachcarter | I’ve only installed it on osx to do that I had to down load some latex package |
07:05:53 | zachcarter | and install it |
07:05:57 | zachcarter | using cask |
07:06:49 | zachcarter | http://kkpradeeban.blogspot.com/2014/04/installing-latexpdflatex-on-ubuntu.html |
07:07:26 | hlt | thanks |
07:07:33 | zachcarter | np |
07:08:38 | ftsf | trying to write a gif encoder in nim for my game |
07:09:28 | zachcarter | sounds complex |
07:10:01 | ftsf | hmm mostly, but i'm not inventing the algorithm, just porting one from JS =\ probably a bad choice |
07:10:14 | ftsf | since i don't know what types any of the variables should be |
07:10:26 | zachcarter | yeah haha |
07:11:01 | hlt | ftsf: you can probably guess |
07:11:10 | ftsf | yeah that's what i'm doing |
07:11:20 | zachcarter | one sec ftsf: I know a really good image lib that might do gif decoding |
07:11:21 | zachcarter | it’s C++ |
07:11:34 | ftsf | need encoding rather than decoding |
07:11:38 | hlt | nightmare mode: port minified version |
07:11:46 | ftsf | hlt, haha =( |
07:12:24 | hlt | how long is this latex conversion gonna take |
07:12:31 | hlt | how big is the nim manual |
07:12:44 | hlt | not sure if it hanged even |
07:12:44 | zachcarter | actually nevermind |
07:13:18 | * | BennyElg quit (Ping timeout: 268 seconds) |
07:13:53 | zachcarter | https://github.com/r-lyeh - lot of good stuff on that github, but it’s all C++ |
07:13:58 | zachcarter | mostly anyway |
07:14:42 | FromGitter | <stisa> hlt it's 100 something pages, but it build the tutorials too |
07:14:54 | ftsf | zachcarter, thanks will have a look |
07:15:04 | hlt | gigantic lagspike |
07:15:42 | ftsf | no gif writing |
07:15:51 | zachcarter | :/ |
07:16:21 | ftsf | not many libs bother with gif output, since until pretty recently it was patented, and i guess it's a pain |
07:16:23 | zachcarter | https://github.com/snowkit/gif probably the only other one I can find |
07:16:36 | zachcarter | at least it’s haxe and not javascript |
07:17:09 | ftsf | zachcarter, yeah, looks like it's based on the same code i'm looking at (or they have a common base) |
07:17:15 | ftsf | but at least it has types \o/ |
07:17:21 | zachcarter | :D |
07:17:57 | * | BennyElg joined #nim |
07:18:00 | ftsf | fortunately i can be lazy with my encoder since i don't need to palettize stuff since it's already paletted |
07:18:35 | ftsf | will be nice to have a button to press to export the last few seconds as a gif |
07:19:12 | * | yglukhov quit (Read error: Connection reset by peer) |
07:20:06 | * | yglukhov joined #nim |
07:21:10 | zachcarter | yeah it will! |
07:26:43 | hlt | still waiting |
07:26:54 | hlt | how long is pdf generation supposed to take |
07:27:01 | * | BennyElg quit (Ping timeout: 240 seconds) |
07:27:41 | * | PMunch joined #nim |
07:27:46 | * | BennyElg joined #nim |
07:28:32 | hlt | manual.log shows a bunch of lines with 'defining Unicode char' but the last line cuts off at 'defi' |
07:38:28 | * | Vladar joined #nim |
07:39:03 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
07:41:44 | zachcarter | hrm Varriount: are you around? |
07:42:28 | zachcarter | probably sleeping if he’s smart unline me |
07:42:31 | zachcarter | unlike* |
07:43:36 | Araq | hlt: just read the html, it is not that big |
07:44:35 | Araq | pdf generation uses latex and doesn't work well |
07:45:42 | FromGitter | <andreaferretti> @zahcarter http://play.nim-lang.org/ is really improved now |
07:45:45 | FromGitter | <andreaferretti> great! |
07:47:38 | zachcarter | andreaferretti: thanks :D |
07:49:01 | ftsf | dat face when you accidentally run `rm add foo.nim` instead of `git add foo.nim` =( |
07:50:59 | Araq | ftsf: you can alias 'rm' so that it puts stuff in your waste bin but I dunno how. |
07:51:28 | ftsf | yeah... i could or to rm -i at least, but usually i trust myself to rm... caught myself out this time |
07:51:34 | Araq | I also don't know why that's not the default for a decade now but I think the reason is a neckbeard |
07:52:01 | ftsf | Araq, because no one can agree where it should go most likely |
07:53:43 | FromGitter | <stisa> Hlt I built the pdfs yesterday, here https://github.com/stisa/misc/tree/master/nim-pdfs |
07:55:21 | * | ftsf quit (Quit: Leaving) |
07:59:37 | * | ftsf joined #nim |
08:01:01 | ftsf | tried to undelete but no luck, oh well, rewrite time |
08:01:25 | ftsf | need to get better with my backups |
08:03:20 | zachcarter | ftsf: what ide do you use? |
08:03:52 | zachcarter | or text editor |
08:03:54 | zachcarter | or whatever |
08:06:02 | euantor | Araq hlt wants to generate PDFs because the JS slows browsers way down |
08:06:27 | euantor | Firefox quite often complains that a script is not responding when I access the docs index or any long doc pages such as the system module |
08:06:50 | FromGitter | <Varriount> zachcarter: Hm? |
08:07:44 | zachcarter | I’m attempting to convert your textmate stuff for Nim to the format ace editor needs but it throws up on some of the regexps :/ |
08:07:54 | zachcarter | not sure how easy it’s going to be to fix |
08:08:23 | zachcarter | they provide a tool that attempts to do the conversion for you |
08:08:29 | zachcarter | but it fails on the nim textmate file |
08:08:55 | zachcarter | I mean it produces something, but that something doesn’t work unless these regexps get fixed for JS I guess |
08:10:11 | Araq | what JS? manual.html is a static page |
08:10:20 | Araq | you don't have to use its search |
08:10:52 | PMunch | Hmm, I'm generating some hashes and I'm running into overflow errors. How can I tell it to just wrap the value? |
08:11:24 | euantor | https://nim-lang.org/docs/system.html |
08:11:24 | ftsf | zachcarter, vim, already checked the swp files |
08:11:33 | euantor | For instance, that takes ages to load on Firefox for me |
08:11:43 | zachcarter | ftsf: I was going to suggest getting a local history plugin |
08:11:53 | PMunch | euantor, loads in a sec or so here.. |
08:12:11 | zachcarter | I don’t know what’s out there for vim I guess swap already does this for you |
08:12:31 | euantor | The worst one is https://nim-lang.org/docs/lib.html |
08:12:43 | * | rokups joined #nim |
08:12:47 | euantor | https://usercontent.irccloud-cdn.com/file/mb8RuFWZ/Capture.PNG |
08:13:35 | euantor | Firefox's JS performance has gotten terrible recently, but that page causes it to show that warning 100% of the time |
08:14:11 | euantor | probably because it's parsing the JSON, which happens synchronously in JS and blocks execution |
08:15:28 | FromGitter | <Varriount> euantor: What JavaScript is system.html running? |
08:16:04 | FromGitter | <Varriount> The documentation index has JS, but as far as I know, the other pages don't |
08:16:13 | euantor | dockhack.js and google analytics |
08:16:21 | euantor | *dochack.js |
08:17:39 | FromGitter | <Varriount> What does the first do? |
08:18:24 | euantor | No idea, it's a Nim compiled JS file so readability isn't its best trait ;) |
08:18:53 | * | BennyElg quit (Ping timeout: 240 seconds) |
08:19:19 | euantor | I think it is what provides the search and the grouping tools |
08:19:23 | * | BennyElg joined #nim |
08:20:43 | FromGitter | <Varriount> There's grouping tools? |
08:21:38 | euantor | Top left of the page, "Group by" - either "section" or "type" |
08:22:02 | FromGitter | <TiberiumN> fstf: once I accidentally removed all files of project I'm doing, so I rebooted to live usb and hopefully restored all files |
08:23:07 | ftsf | \o/ fortunately the one i deleted was pretty small, just finished rewriting it |
08:23:45 | PMunch | Anyone know how to do the overflow thing I mentioned? |
08:24:19 | ftsf | PMunch, use an unsigned type? |
08:24:37 | PMunch | They don't have overflow checks? |
08:24:47 | ftsf | "Unsigned operations all wrap around; they cannot lead to over- or underflow errors." according to the manual |
08:24:55 | PMunch | Ah, cool |
08:28:24 | PMunch | Hmm, toHex in strutils should really support unsigned as well.. |
08:28:24 | * | BennyElg quit (Ping timeout: 240 seconds) |
08:29:59 | dom96 | yeah, lib.html freezes for me too |
08:30:07 | dom96 | Maybe we should just remove that JS from it. |
08:30:42 | dom96 | But yeah, Firefox is really slow nowadays. So much so that I am considering switching to Chrome. |
08:31:08 | hlt | dom96: chromium? |
08:31:23 | hlt | stisa: thank |
08:31:24 | dom96 | Twitter and Facebook are the worst. Facebook often takes 100s of seconds to load completely for me and sometimes it continues spinning forever. |
08:31:25 | hlt | s |
08:31:49 | dom96 | hlt: Chrome. |
08:31:58 | hlt | why |
08:32:06 | * | hlt considers arguing about facebook being a complete waste of time but decides against it |
08:32:33 | FromGitter | <TiberiumN> Chrome has its own proprietary optimisations |
08:32:33 | FromGitter | <TiberiumN> IMO |
08:32:43 | dom96 | Because *shrug* |
08:33:02 | euantor | I've considered going to Chrome too, but I'd have to sync across my bookmarks and extensions that I've built up over the last however many years that I've used Firefox |
08:33:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
08:33:08 | * | yglukhov_ joined #nim |
08:33:42 | FromGitter | <TiberiumN> Oh, I use only chrome for the same reason |
08:33:45 | hlt | webextensions are crap and things like noscript are impossible to do |
08:33:49 | dom96 | I haven't used Bookmarks in many years. |
08:33:50 | * | jackv joined #nim |
08:34:03 | hlt | + google botnet no thanks |
08:34:06 | FromGitter | <TiberiumN> Everything is synced automatically |
08:34:07 | FromGitter | <Varriount> Chrome has a bookmarks importer |
08:34:15 | FromGitter | <TiberiumN> hlt: lol |
08:34:24 | hlt | if i everwould use something blink i'd use ungoogled-chromium |
08:34:25 | FromGitter | <Varriount> hlt: Join ussss |
08:34:44 | hlt | no thanks, i am autistic |
08:34:47 | FromGitter | <TiberiumN> Do you use only gnu/Linux without proprietary packages? |
08:34:51 | hlt | you probably wouldn't want me anyway |
08:34:58 | hlt | tiberiumN: yes. |
08:35:09 | FromGitter | <TiberiumN> Really? Ok then |
08:35:10 | dom96 | Nothing wrong with being autistic |
08:35:34 | FromGitter | <Varriount> Now now, no need for name calling. |
08:35:43 | dom96 | Everybody's on the spectrum anyway. |
08:35:51 | dom96 | Varriount: Who's name calling? |
08:35:58 | hlt | modern browsers are crap, burn it all fown |
08:36:13 | hlt | Varriount: not even self-name calling? |
08:36:47 | hlt | i use qutebrowser when firefox is too heavy (i.e. android tablet arch linux chroot) |
08:36:47 | FromGitter | <Varriount> hlt: What's your opinion on CEF-based applications, like Slack? |
08:37:06 | FromGitter | <TiberiumN> It's not gnu Linux |
08:37:06 | hlt | slack is proprietary IRC+ garbage |
08:37:09 | FromGitter | <Varriount> (Or Atom, VS Code) |
08:37:28 | hlt | neovim for president |
08:37:36 | hlt | Atom is a web browser |
08:37:42 | hlt | i dont consider it to be an editor |
08:37:44 | euantor | I couldn't survive without bookmarks dom96 |
08:37:50 | FromGitter | <Varriount> Sublime Text for vice president? |
08:38:00 | hlt | proprietary |
08:38:00 | euantor | Though I do have a lot that probably aren't useful anymore from long ago |
08:38:12 | hlt | it can at most be the cleaner of oval office |
08:39:03 | hlt | i have a strong dislike for non-free software after dealing with their stupid practices for almost a decade |
08:39:47 | * | BennyElg joined #nim |
08:40:51 | FromGitter | <Varriount> hlt: What's your opinion on the various open source licenses? Should we all be using GPL? |
08:41:09 | hlt | imo, yes |
08:41:46 | hlt | BSD allows proprietary software vendors to release binaries of modified BSD'd software without the modified source code |
08:42:17 | hlt | if i give you something, you ought to give back |
08:42:44 | * | zachcarter quit (Quit: zachcarter) |
08:43:07 | * | yglukhov joined #nim |
08:43:11 | flyx | do us a favor: if libman comes online, discuss this elsewhere |
08:43:51 | FromGitter | <Varriount> Hm. Is there a license out there that forces release of modified library source code, but still allows for linking into a private application? |
08:44:06 | flyx | Varriount: GPL with linking exception |
08:45:04 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
08:47:26 | FromGitter | <Varriount> hlt: While I agree |
08:48:04 | ftsf | Varriount, "private application"? as in one that's not going to be redistributed? |
08:48:08 | ftsf | or private as in closed source? |
08:48:20 | ftsf | if the latter, LGPL is good. if the former, whatever you like. |
08:48:57 | FromGitter | <Varriount> While I agree with your sentiment, I'd rather risk going with a license companies will accept, even if it means risking them selling my work |
08:51:21 | * | Arrrr joined #nim |
08:52:32 | FromGitter | <Varriount> ftsf: LGBL doesn't define adequately define "linking" |
08:53:15 | hlt | lesser general biblical license |
08:53:27 | FromGitter | <Varriount> And I'd want to allow static linking too |
08:54:34 | FromGitter | <Varriount> hlt: If you violate it, you get struck by lightening and locusts |
08:54:58 | hlt | violating it is taboo |
08:54:59 | ftsf | Varriount you can always add your own exceptions |
08:55:24 | hlt | Varriount: you can always sublicense. |
09:04:58 | * | couven92 joined #nim |
09:07:20 | gokr | Perfect time sinks: dynamic vs static typing, emacs vs vim and of course... licenses. Fiiight! |
09:08:15 | dom96 | don't forget about tab vs spaces |
09:08:19 | dom96 | *tabs |
09:08:29 | gokr | Ha! yep. |
09:09:01 | gokr | I wonder if I am the only Smalltalker-by-heart that actually likes Nim. |
09:11:41 | ftsf | which indentation method should i use in which editor for writing the licence for my project? |
09:12:21 | Araq | ftsf: post this question to HN and reddit. delay the development of the singularity |
09:12:32 | * | Nopply joined #nim |
09:12:40 | ftsf | ;) |
09:12:41 | * | PMunch quit (Quit: leaving) |
09:13:12 | gokr | Btw, if I were to say ... convince one of the core devs of Emacs to start playing with Nim - is this the shit to use? https://github.com/nim-lang/nim-mode |
09:14:03 | euantor | Anybody got any idea why this might fail: https://github.com/euantorano/jwt.nim/blob/master/src/jwt.nim#L127 |
09:14:09 | Araq | huh, good question. I think so. |
09:14:24 | Nopply | hey, anyone know how to import a lib only on a specific platform? |
09:14:30 | euantor | The error I get is: https://www.irccloud.com/pastebin/xSOS7SGc/ |
09:14:54 | hlt | dom96: thankfully nim shuts down the tabs vs spaces fight |
09:15:08 | hlt | you cant use tabs |
09:15:11 | hlt | problem solved |
09:15:23 | dom96 | True, but that doesn't stop people from trying :) |
09:15:32 | dom96 | and coming up with hacks to allow it |
09:16:33 | Araq | euantor: because Nim is not covariant? |
09:17:04 | euantor | What would be the recommended approach for what I'm trying to do then? |
09:18:18 | euantor | I could always just take any old object, but I wanted the inheritance to make it obvious that you could use the base predefined fields |
09:18:25 | dom96 | Nopply: when defined(windows): import blah |
09:18:54 | Nopply | ill try that now, thanks. |
09:24:35 | Arrrr | I have a question, shouldn't the prefered way of checking os be https://github.com/nim-lang/Nim/blob/devel/lib/system/platforms.nim ? |
09:25:03 | Arrrr | Seems more safe to `when targetOS == OsPLayeform.windows` than `when defined(windows)` |
09:25:12 | Arrrr | But i never see anyone recommending it |
09:26:14 | Arrrr | Maybe it should be encouraged in the manual |
09:28:04 | * | BennyElg quit (Ping timeout: 252 seconds) |
09:28:31 | * | BennyElg joined #nim |
09:28:35 | Araq | uh oh |
09:28:58 | Araq | that file is never udpated for new OSes / CPUs |
09:29:44 | FromGitter | <Varriount> Why not? Overlooked? |
09:30:15 | Araq | Arrrr: 'when defined(windows)' is everywhere already |
09:30:24 | Araq | varriount: forgot it exists |
09:31:05 | couven92 | dom96, Araq, I have located my ISO image for Windows XP and I have notified our technical team to reserve a DNS in our DNS namespace here at UiT, I'll have to finish my hand-in now, but later today I am going down to the server room, to flash Windows XP and set it up for a Nim Windows XP testing machine |
09:31:08 | Arrrr | Yes, and as safe as `if state == "true"` |
09:31:35 | dom96 | couven92: cool! |
09:32:32 | Araq | Arrrr: that's true but the 'defined' also has advantages, for example you can do 'nim check -d:js foo.nim' for a project that uses the JS backend |
09:33:02 | Araq | though I guess this actually means Nim's commands are illdesigned |
09:34:01 | Arrrr | In my opinion, osplatform enum checking should be favoured. Allow it to handle that case. |
09:34:09 | couven92 | Araq, and `nim check -d:windows foo.nim` to check whether stuff is syntactically correct even when you're actually compiling on Linux? Even without a xplat compiler? That's cool... |
09:34:48 | Araq | couven92: that's covered by 'nim check --os:windows foo.nim' though |
09:35:02 | couven92 | Ah! Right, of course! :) |
09:35:03 | Araq | I think what's missing is a --backend:js switch |
09:35:29 | hlt | FYI: ./koch clean does not delete dist/nimble/src/nimcache/ |
09:36:08 | couven92 | hlt, but does it deleted the rest of the dist/nimble folders? |
09:36:24 | hlt | not sure |
09:36:35 | couven92 | is there sth in dist/nimble/src? |
09:36:44 | hlt | lemme see |
09:37:08 | hlt | hold on i am tar-ing my .nim folder |
09:38:09 | couven92 | `ls -lah dist/nimble` or `ls -lah dist/nimble/src` would be enough to check what is there... :O |
09:38:39 | couven92 | because, it might be that koch simply does not care about cleaning up the dist/nimble folder... |
09:38:46 | hlt | tar-ing over ssh |
09:40:26 | * | BennyElg_ joined #nim |
09:40:33 | * | BennyElg quit (Ping timeout: 246 seconds) |
09:41:11 | hlt | couven92: has files |
09:42:38 | euantor | Any ideas on how best to achieve what I'm trying to do Araq? I've looked around and understand what you said about it not being covariant, but what would be your approach to tackling what I'm trying to tackle? Coming from C# I expected it to just work. It's the same way the Rust and Crystal implementations work too, as I was trying to achieve a similar feel |
09:44:31 | couven92 | hlt, that's what I thought... Maybe write up an issue in https://github.com/nim-lang/Nim/issues/new?title=koch+clean+does+not+clean+nimble+src+files |
09:44:42 | hlt | soon |
09:44:45 | hlt | will do |
09:44:49 | hlt | not at pc atm |
09:44:52 | Araq | euantor: maybe I misread your code |
09:45:10 | Araq | anyway, inheritable is unsafe, don't use it, inherit from RootObj instead |
09:45:12 | euantor | basically, I want to have a base `Claims` type that can be extended |
09:45:49 | euantor | Ok, I cna fix that bit |
09:45:55 | euantor | The claims are to implement this: https://jwt.io/introduction/#payload |
09:46:37 | hlt | can i do parallel builds with nim? |
09:47:25 | euantor | And I need to be able to decode the token back from the encoded string, which is why I made the token generic |
09:48:09 | Araq | hlt: it does it out of the box |
09:48:13 | hlt | oh? |
09:48:18 | couven92 | hlt, I think that is something that has to be supported by your backend compiler. The VCC backend for example, supports parallel builds, but in Nim we had to serialize the build, because of access contention for generating the .pdb files |
09:48:39 | hlt | how does it know how many cores i have? |
09:48:49 | Araq | hlt: it asks the OS |
09:48:56 | hlt | okay then |
09:49:19 | hlt | so it runs number of physical or logical cores of jobs? |
09:50:32 | couven92 | hlt, on Windows it will be the value indicated by e.g. the `NUMBER_OF_PROCESSORS` environment variable (which is set automagically by Windows) |
09:50:33 | Araq | euantor: sorry I'm busy but Rust doesn't have inheritance so do what they do |
09:50:37 | * | bjz joined #nim |
09:51:03 | hlt | i see, ok |
09:52:12 | euantor | Oh, it seems they don't inherit. It's just a standard generic |
09:52:21 | hlt | how do i use the command line switch --app? idk what command to use it with |
09:52:22 | hlt | from what i gather it generates a project |
09:52:23 | * | BennyElg joined #nim |
09:53:07 | euantor | I guess I can just do it that way, at least that's easy to implement |
09:53:54 | couven92 | hlt, (In reality though, it is a call to the OS to query the CPU information, i.e. GetLogicalProcessorInformation function on Windows, or sth. like get_nprocs on Linux) |
09:55:08 | couven92 | Alternatively there's also the x86/x64 `CPUID` Assembler instruction, which under the covers is what is actually executed on the hard metal |
09:55:21 | euantor | Now to work out the best way to serialise the claims to JSON. Thanks Araq for pointing me to a solution! |
09:55:53 | couven92 | euantor, aren't claims in Windows usually already in XML? |
09:55:53 | hlt | couven92: already know the gpuid stuff |
09:56:06 | * | BennyElg_ quit (Ping timeout: 268 seconds) |
09:56:22 | euantor | couven92: This is to implement JSON Web Token support, they call the payload of the token "claims" |
09:56:36 | euantor | THough they also sometimes call it the payload |
09:56:55 | couven92 | Ah, just figure it as a BLOB and UrlSafeBase64 encode it? |
09:57:41 | euantor | It's a json object, then you url safe base64, yeah |
09:58:44 | couven92 | iirc the bottom of the JWS RFC documents gives some rather good examples (also with JWT) for doing this |
09:59:33 | euantor | I've not read the JWS RFC, just the JWT one. I'll takea look at it now |
10:00:08 | couven92 | euantor, Just read the TOC and jump right to appendix A! |
10:00:17 | couven92 | ;) |
10:00:27 | euantor | That's what I just did :P |
10:03:34 | couven92 | Ah, yeah... RFC documents... Aren't they beautiful. Anyone remember RFC 2616 for HTTP? (it has now been obsoleted and replaced by a better organized version)... I realized I had gone to far when I started correctly reciting passages from the RFC to my classmates during our Networking course... :P |
10:04:09 | * | BennyElg_ joined #nim |
10:06:01 | * | BennyElg quit (Ping timeout: 252 seconds) |
10:09:33 | FromGitter | <Varriount> couven92: If you're feeling really adventurous, go read the C++ specifications |
10:11:44 | couven92 | @Varriount, I actually felt rather adventourous when I read the ANSI C specification (with the additional Microsoft specific additions). |
10:12:38 | couven92 | Like [Interpreting More Complex Declarators](https://msdn.microsoft.com/en-us/library/1x82y1z4.aspx) that's a fun read! :D |
10:14:12 | couven92 | however, that page is really good for C parser implementors. It explains how you parse the type of sth in C. But damn, it's a pain in the a*** |
10:16:13 | * | krux02 joined #nim |
10:42:37 | hlt | can i create a template which takes an arbitrary amount of arguments? like templateName name, parent, a: int, b: string, c: bool, ..., h: string: ..body.. converted to proc name*(cls: typedesc[parent], a: int, b: string, c: bool, ..., h: string): parent = ..body.. |
10:43:37 | hlt | i tried to create a macro but the thing i want fails to be parsed by nim so i assume it wouldn't be possible |
10:47:12 | ftsf | hlt, varargs? https://nim-lang.org/docs/manual.html#templates-varargs-of-untyped |
10:47:27 | * | Tiberium joined #nim |
10:58:19 | * | krux02 quit (Disconnected by services) |
10:58:19 | * | krux02- joined #nim |
10:58:22 | * | krux02- is now known as krux02 |
10:58:35 | * | krux02 quit (Disconnected by services) |
10:58:35 | * | krux02- joined #nim |
10:58:37 | * | krux02- is now known as krux02 |
10:58:50 | * | krux02 quit (Disconnected by services) |
10:58:50 | * | krux02- joined #nim |
10:58:53 | * | krux02- is now known as krux02 |
10:59:06 | * | krux02 quit (Disconnected by services) |
10:59:06 | * | krux02- joined #nim |
10:59:08 | * | krux02- is now known as krux02 |
10:59:11 | FromGitter | <NevnHiwEjuam_twitter> I'm rather confused about the garbage collection mechanism. I mean, I've read about, say, Mono's SGen and it seems like it can pause from time to time. I'm wondering how "defered ref counting" in Nim affects performance? |
10:59:21 | * | krux02 quit (Disconnected by services) |
10:59:21 | * | krux02- joined #nim |
10:59:24 | * | krux02- is now known as krux02 |
10:59:37 | * | krux02 quit (Disconnected by services) |
11:01:16 | Araq | https://nim-lang.org/docs/gc.html |
11:01:35 | FromGitter | <NevnHiwEjuam_twitter> oh!... wikipedia gave me a dead link for that |
11:02:01 | Tiberium | NevnHiwEjuam_twitter: fix it :) |
11:03:22 | FromGitter | <NevnHiwEjuam_twitter> I've tried editing an article before. Smallest changes get your ass ridden by the goon squad |
11:04:08 | FromGitter | <NevnHiwEjuam_twitter> Some poor book author got banned for claifying misinformation on the article about his book |
11:04:37 | Tiberium | hmm, I don't know. I've edited PyPy article on russian wikipedia like 3-4 times, and everything was good |
11:04:39 | Tiberium | no bans :) |
11:05:04 | FromGitter | <NevnHiwEjuam_twitter> maybe Russians are just better mannered |
11:05:41 | Tiberium | not really, maybe it's because this article isn't popular |
11:06:04 | dom96 | Yeah, it took us like 5 years to get the Nim Wikipedia article to remain. |
11:06:27 | FromGitter | <NevnHiwEjuam_twitter> I am hoping someday Nim gets tabulator support. Have spacing as a convention, sure, but tabbing is my personal preference. |
11:06:37 | Tiberium | you can configure your editor |
11:06:45 | FromGitter | <NevnHiwEjuam_twitter> oh? |
11:06:53 | Tiberium | and when you press "tab" it will just convert it to 2 or 4 spaces |
11:06:58 | Tiberium | it's a very common feature |
11:07:01 | FromGitter | <NevnHiwEjuam_twitter> oh, I know that |
11:07:15 | FromGitter | <NevnHiwEjuam_twitter> it's just... Python accepts space and tab alike. |
11:07:22 | dom96 | Why do you prefer tabs? |
11:07:33 | Tiberium | honestly I use spaces in python too |
11:07:37 | Tiberium | this is by PEP8 |
11:07:55 | FromGitter | <NevnHiwEjuam_twitter> well... I have a habit of holding delete to get rid of code and deleting spaces just means more iteration |
11:08:49 | FromGitter | <NevnHiwEjuam_twitter> oh! also, it looks more uniform on webpages. If I do spaces, it's all messed up indentation |
11:09:23 | Tiberium | but tabs can display differently, while spaces cannot |
11:09:33 | Tiberium | some systems have tabs as 4 spaces, some - 8 spaces |
11:09:40 | hlt | ftsf: can i use that inbetween arguments? |
11:10:21 | Tiberium | NevnHiwEjuam_twitter: also, my VScode deleted indentation level on one backspace |
11:10:22 | Tiberium | not on two |
11:10:31 | ftsf | hlt, i'm not sure |
11:10:33 | FromGitter | <NevnHiwEjuam_twitter> true... but like... I prefer my indentation to have the equivalence of 2 spaces. If a tab is set to insert like 4/8 spaces, it shows and I get irked by it |
11:10:49 | Tiberium | and that's why 2 spaces is preferred in Nim :) |
11:11:22 | ftsf | while tabs are my personal preference, i've adapted for nim =p |
11:11:27 | FromGitter | <NevnHiwEjuam_twitter> unfortunately, I don't think KWrite has per-language indentation options |
11:11:42 | ftsf | well "tabs for indentation, spaces for alignment" |
11:12:02 | FromGitter | <NevnHiwEjuam_twitter> erm.... ok |
11:12:28 | couven92 | @NevnHiwEjuam_twitter there's sth called [.editorConfig](http://editorconfig.org/) |
11:12:53 | FromGitter | <NevnHiwEjuam_twitter> oh neat |
11:14:51 | FromGitter | <NevnHiwEjuam_twitter> I feel like a doof..... I had space-insertion tabbing already enabled |
11:15:21 | FromGitter | <NevnHiwEjuam_twitter> guess my problem is solved |
11:26:40 | Tiberium | how to use arguments in template for generating different code? |
11:26:53 | Tiberium | so I want to have "template answer*(data: string, ret: false) {.dirty.} = " and if ret is true, I want to add "return" statement |
11:28:40 | Tiberium | ah, nvm, I'll just create another template "retAnswer" which calls first template and then adds "return" |
11:29:36 | * | jackkv joined #nim |
11:38:51 | Tiberium | by the way, if I expose some variable in proc while generating it in macro, if this variable will not be used by proc body, will this variable be optimized away in compile mode? |
11:42:45 | * | yglukhov quit (Remote host closed the connection) |
11:49:05 | * | vlad1777d joined #nim |
11:49:32 | Tiberium | hmm |
11:50:02 | Tiberium | How can I get rid of additional "StmtList" if I generate part of my code by "quote do" ? |
11:51:11 | Tiberium | something like this doesn't work : https://gist.github.com/TiberiumN/687b43d96af0057d6b16aefe4a72b28b |
11:51:20 | Tiberium | procBody is a stmt list too |
12:00:17 | * | zachcarter joined #nim |
12:00:17 | * | zachcarter quit (Client Quit) |
12:06:01 | * | bjz quit (Ping timeout: 240 seconds) |
12:06:38 | * | bjz_ joined #nim |
12:10:22 | * | arnetheduck joined #nim |
12:12:36 | * | devted joined #nim |
12:13:00 | * | zachcarter joined #nim |
12:37:44 | FromGitter | <cooldome> Guys, I am currently looking at a couple Nim issues reported for iterators including my own and made some progress. I need to find a piece of code in compiler/ that rewrites a for loop with inline iterator into a while loop. Can't find it in 100k codebase. Any idea? |
12:37:57 | zachcarter | dom96: do you thinkwe should turn back on cloudflare? |
12:39:10 | FromGitter | <cooldome> @TiberiumN Consiger using getAst with dirty template instead |
12:39:48 | dom96 | zachcarter: if you'd like |
12:40:14 | zachcarter | if you’re happy with the state of things I am |
12:41:28 | zachcarter | otherwise I can make some more changes first |
12:42:17 | * | rokups quit (Quit: Connection closed for inactivity) |
12:42:28 | Tiberium | cooldome: ok, thanks for tip |
12:43:05 | dom96 | zachcarter: hrm, why did you remove the "Compiler output" and "Output" text? |
12:43:36 | zachcarter | I can re add labels I switched the element from message box to notification which doesn’t have a title option like the message box did |
12:45:20 | dom96 | I preferred the message box, I guess you changed it to align with the code editor? |
12:46:06 | zachcarter | the main reason was that message box wasn’t playing nicely with pre |
12:46:17 | zachcarter | the messagebox would resize to the pre’s content and take over the whole screen |
12:46:19 | Tiberium | dom96, question about async macro: if I have an async proc, and I have a dirty template which generates "return" inside async proc. And error - "Async procedure (handler20) yielded `nil`, are you await'ing a `nil` Future?" |
12:46:21 | zachcarter | and squish the editor |
12:46:29 | Tiberium | how can I fix that? change "return" to something else? |
12:46:42 | zachcarter | these notifiactions don’t seem to do that |
12:46:48 | Tiberium | and template is not placed inside async proc |
12:46:54 | dom96 | zachcarter: Can't you add 'overflow: auto' to the 'pre'? |
12:47:16 | zachcarter | I did - the pre’s do offer scrolling now |
12:47:23 | zachcarter | I’ll try to use message boxes again and see if I can get it working |
12:47:43 | dom96 | If you upload the message box version again I might be able to help you out |
12:47:48 | zachcarter | okay sure |
12:48:02 | zachcarter | might be later this afternoon but I will do so |
12:48:45 | dom96 | Tiberium: You must figure out a way to place the 'return' inside the async proc |
12:48:57 | Tiberium | dom96, I am placing it, but from dirty template |
12:49:11 | dom96 | Tiberium: Yes, but you must place it directly |
12:49:16 | dom96 | Otherwise the async macro doesn't see it |
12:49:57 | dom96 | Unfortunately I don't think there is any way to make it work from a dirty template |
12:50:41 | dom96 | zachcarter: okay, let me know |
12:50:44 | zachcarter | will do |
12:51:52 | dom96 | Also, when a timeout is reached you should show it somewhere |
12:54:10 | hohlerde | i am getting the following compile error when compiling my old project sources with nim version 0.16.x or 0.15.3: |
12:54:10 | hohlerde | lib/system.nim(2581, 7) Error: can raise an unlisted exception: ref AssertionError |
12:54:11 | hohlerde | line 2581 points to procedure sysFatal |
12:54:24 | hohlerde | any hint where I can look to solve the issue? |
12:56:10 | Tiberium | you probably have raises pragma |
12:56:22 | Tiberium | like {.raises:[]} |
12:56:27 | Tiberium | but your proc CAN raise an exception |
12:57:51 | hohlerde | yeah, problem is with older compiler versions that AssertionError was apparently not raised/defined. is there an easy way to find out which procedure raises that AssertionError? |
12:58:15 | dom96 | see what's on line 2581 in system.nim |
12:58:31 | dom96 | Is there no "instantiation from here" messages? |
12:58:41 | zachcarter | dom96: it’s updated again to use message boxes |
12:58:47 | zachcarter | still not sizing correctly |
13:00:06 | hohlerde | https://privatebin.tarakis.de/?9ca6368d84d52369#HrXd5KpVBv0QUhd0xchb+urEAL7zBHUyvLrDH1vW8WQ= |
13:00:18 | hohlerde | it refers to line 27 in the pastebin |
13:00:41 | zachcarter | gotta run will check logs when I get back |
13:00:41 | Tiberium | hohlerde, is there any "instantiation from here" as dom96 suggested? |
13:00:43 | * | zachcarter quit (Quit: zachcarter) |
13:00:47 | Tiberium | in console while compiling |
13:01:22 | hohlerde | commands.nim(420, 104) template/generic instantiation from here |
13:01:23 | hohlerde | lib/system.nim(2581, 7) Error: can raise an unlisted exception: ref AssertionError |
13:01:28 | dom96 | zachcarter: You can just add 'overflow: auto; max-height: 130pt;' on the <pre> to fix that. |
13:01:51 | Tiberium | hohlerde, so it means you need to go to commands.nim line 420 |
13:01:55 | Tiberium | position 104 |
13:02:05 | hohlerde | https://privatebin.tarakis.de/?ff862e2e3ef46a00#DQ/XfVdd+gZ/NlV91AAHT6GMYNaCK/o45nDF0ljOJmA= |
13:02:30 | Tiberium | {.raises: [ValueError].} |
13:02:52 | FromGitter | <Varriount> @zacharycarter Would you mind if I let the web developers at my workplace look at the playground and give their thoughts? |
13:02:52 | Tiberium | change it to {.raises: [AssertionError, ValueError].} |
13:02:55 | Tiberium | probably this would work |
13:03:05 | hohlerde | thats the proc definition, the raises pragma |
13:03:17 | Tiberium | no |
13:03:20 | Tiberium | pragma |
13:03:21 | hohlerde | yeah, but I am not aware what part is actually raising AssertionError |
13:03:26 | hohlerde | I don't raise it in my code |
13:03:45 | hohlerde | will try to change it |
13:03:50 | Tiberium | hohlerde, AFAIK it doesn't need to be in your code only |
13:03:57 | Tiberium | it can be in libraries you're using, even stdlib |
13:04:09 | dom96 | yeah, seems like one of the procedures you're calling must be raising an AssertionError |
13:04:19 | dom96 | The error message should be better |
13:04:38 | dom96 | What you can do is cut down your code until you don't get the error anymore |
13:04:41 | dom96 | to find the cause |
13:04:49 | * | tigerfinch quit (Ping timeout: 268 seconds) |
13:06:09 | FromGitter | <stisa> zachcarter : currently looks like this on my phone : https://imagebin.ca/v/3Kd3gkXmp4V5 , you have https://github.com/zacharycarter/nim-playground-frontend/pull/1 that should let it stack |
13:11:42 | * | tigerfinch joined #nim |
13:19:57 | FromGitter | <Varriount> @stisa Do you think everything should always be stacked, or just stacked on mobile? |
13:20:27 | FromGitter | <stisa> Just on mobile |
13:22:35 | dom96 | I don't think mobile support is that important for this site, it won't be used often on mobile. |
13:26:13 | FromGitter | <stisa> dom96 : why not? Given that the site already has the css to handle different screen sizes, it's only missing the meta viewport tag |
13:30:37 | Araq | cooldome: the full code is in compiler/transf.nim and compiler/lambdalifting.nim |
13:30:52 | hohlerde | mhm, it is a doAssert(..) call in proc split*(...) in strutils.nim. i wonder why AssertionError is mentioned at all. according to the sources in system.nim it should be hidden, and I am even compiling with -d:release |
13:31:22 | Araq | the most pressing problem is that the order of the passes is wrong, first should be transf.nim's iterator inlining and then the closure creation |
13:31:36 | Araq | so that for loop variables are moved to the heap too |
13:32:06 | Araq | you can change the order pretty easily but then some tests fail that require the order of the passes to be in the other way round |
13:32:06 | Tiberium | if I port code from node JS app with Zlib license to my MIT app, would be there any problems? |
13:32:13 | Araq | I don't remember why that is though. |
13:32:37 | Araq | hohlerde: indeed AssertionError is not a tracked exception and you cannot catch it anyway |
13:33:03 | * | BennyElg joined #nim |
13:33:05 | Araq | well ofc technically you can but the spec doesn't allow it |
13:36:40 | * | BennyElg_ quit (Ping timeout: 252 seconds) |
13:37:38 | Araq | cooldome: it's worth to try to merge these two passes into one but the LL needs to be optional for the JS backend where we simply use JS's closure mechanisms |
13:38:32 | Araq | oh and it's also the most complex piece of code in the whole compiler so you might work on something else first :-) |
13:39:40 | * | devted quit (Quit: Sleeping.) |
13:43:54 | FromGitter | <Varriount> I still have nightmares about the lambda lifting code. :0 |
13:45:15 | hohlerde | https://privatebin.tarakis.de/?9832cf80de25e73d#r/yRqJJ9yAjMB/XDU543BEOw58YZez9kIlb0TX0vQMw= |
13:45:29 | hohlerde | that code produces a compile time error for me with nim 0.15.3 |
13:45:40 | FromGitter | <cooldome> @ Araq: I have simpkie |
13:46:13 | Araq | not even my dictionary knows this word |
13:46:53 | Araq | varriount: I studied C#'s LL and it comparable in complexity. ymmv. |
13:47:03 | FromGitter | <cooldome> @ Araq: Oops, I have simplier goals in mind, but looks like I have found the piece of code I was looking for |
13:47:08 | FromGitter | <cooldome> thanks |
13:48:18 | FromGitter | <Varriount> Araq: I'm sure it is just as complex. I'm well aware that lambda lifting will always be complex, no matter the language. |
13:48:46 | Araq | well there are books written about it for a reason :-) |
13:49:40 | FromGitter | <cooldome> Apologies again, it all unlocked phone |
13:49:55 | Araq | hohlerde: your .base method also must be explicit .raises: [] for this to work |
13:52:04 | * | bjz_ quit (Ping timeout: 240 seconds) |
13:52:53 | hohlerde | still gives me an error after adding {.base, raises:[].} to base method. i'll try it with 0.16.1 |
13:53:42 | * | bjz joined #nim |
13:58:29 | hohlerde | gives the same error with 0.16.1 (master branch) |
13:58:31 | hohlerde | https://privatebin.tarakis.de/?1022f43c99c9206c#ktLpQ1zcXPJoYUM1ai1YaFzr1KaGGz64kbZP4lYOcXc= |
14:11:41 | dom96 | 'master' branch is just the same as 0.16.0 |
14:11:49 | dom96 | you want 'devel' |
14:14:24 | * | rokups joined #nim |
14:15:38 | * | devted joined #nim |
14:20:31 | hohlerde | with devel same behaviour |
14:22:13 | * | nsf quit (Quit: WeeChat 1.7) |
14:23:42 | * | PMunch joined #nim |
14:30:45 | * | Gonzih quit (Quit: WeeChat 1.7) |
14:31:06 | * | Gonzih joined #nim |
14:37:23 | * | bjz_ joined #nim |
14:37:50 | * | bjz quit (Ping timeout: 260 seconds) |
14:43:06 | * | niv joined #nim |
14:53:30 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:55:51 | * | bjz joined #nim |
14:56:45 | * | Jesin quit (Quit: Leaving) |
15:00:26 | hohlerde | wow, the new website layout is amazing |
15:01:36 | * | Jesin joined #nim |
15:20:24 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:23:48 | * | brson joined #nim |
15:27:18 | * | zachcarter joined #nim |
15:30:45 | Sentreen | Yeah it looks really nice! |
15:42:11 | * | Nopply quit (Read error: Connection reset by peer) |
15:54:03 | * | PMunch quit (Quit: leaving) |
16:02:06 | * | Amun_Ra quit (Ping timeout: 264 seconds) |
16:02:36 | * | Amun_Ra joined #nim |
16:07:48 | * | cspar joined #nim |
16:09:32 | * | cspar_ quit (Ping timeout: 260 seconds) |
16:09:50 | * | nsf joined #nim |
16:37:45 | * | Matthias247 joined #nim |
16:46:57 | * | Tiberium quit (Read error: Connection reset by peer) |
16:47:44 | * | Tiberium joined #nim |
16:52:38 | hlt | hello |
16:52:48 | hlt | can i expand a vararg inside a template? |
16:53:01 | FromGitter | <Varriount> hlt: What do you mean? |
16:53:24 | hlt | i want to expand a vararg[untyped] to what it originally was |
16:53:40 | Tiberium | yeah, I have been interested in doing this too |
16:54:01 | Tiberium | so if we have template a(b: varargs[untyped]) = someProc(b) |
16:54:23 | Tiberium | so a(1,2,3) would result in someProc(1,2,3) |
16:55:09 | hlt | template test*(name: untyped, parent: untyped, args: vararg[untyped], body: untyped) = proc name*(cls: typedesc[parent], expand?(args)): parent = body |
16:57:08 | * | Vladar quit (Quit: Leaving) |
16:57:19 | FromGitter | <Varriount> Sounds like a job for a macro |
16:57:51 | hlt | i want to do it like a macro but when i try to dumpTree: for the model i want the compiler will fail to parse |
16:57:54 | * | sz0 joined #nim |
16:58:05 | hlt | so i tried to do it as a template |
16:58:34 | Tiberium | if compiler fails to parse |
16:58:38 | Tiberium | it means that your code is incorrect |
16:58:43 | Tiberium | dumpTree works on ANY valid nim code |
16:59:10 | hlt | my code is not exactly valid nim code |
16:59:18 | hlt | i'm trying to somewhat extend the language |
17:00:16 | * | Tiberium quit (Remote host closed the connection) |
17:02:14 | * | Tiberium joined #nim |
17:02:27 | * | arnetheduck quit (Ping timeout: 240 seconds) |
17:02:35 | hlt | i'm trying to replicate python's "class methods" |
17:03:30 | hlt | that is, methods of a class that create an instance of that class with arguments given |
17:06:18 | hlt | but not like __init__ |
17:06:48 | subsetpark | hlt: Python's classmethods are methods that take classes, rather than class instances, as their first argument |
17:06:57 | hlt | yes |
17:07:06 | subsetpark | That's what you mean? |
17:07:16 | Tiberium | hlt, you can do it very easily in Nim |
17:07:48 | hlt | Tiberium: i currently do something like this: |
17:08:22 | hlt | proc classmethod*(cls: typedesc[Class], arg1: string, ...): Class = |
17:08:37 | hlt | result is an instance of class, so i can just assign things to it |
17:08:51 | Tiberium | you're creating instances via classmethod? |
17:08:59 | hlt | then i can do Class.classmethod("test", ...) and i get a newly created class instance |
17:09:15 | hlt | Tiberium: yes |
17:09:28 | Tiberium | why not natural Nim style? |
17:09:32 | zachcarter | does anyone know the name of the website that ranks programming language popularity? |
17:09:34 | hlt | what do you mean? |
17:09:39 | hlt | Class.classmethod is classmethod(Class, ...) |
17:09:49 | hlt | Class is a type descriptor of Class |
17:09:49 | Tiberium | hlt, ah, nvm |
17:09:53 | Tiberium | I know |
17:10:10 | hlt | it just looks ugly, so i wanted to do something like this: |
17:10:32 | hlt | classmethod Class.classmethod*(arg1: string, ...) = |
17:10:53 | hlt | which is converted to above |
17:10:59 | hlt | but it's not valid nim so i cannot do that |
17:11:24 | hlt | at least i don't have the skills yet (2nd day at nim) |
17:12:35 | hlt | i thought this would be useful for creating different variations of the same object |
17:13:15 | Tiberium | hlt, there are object variants in nim |
17:13:32 | hlt | i.e. HttpResponse.OK(resp: string) and HttpResponse.NOTFOUND(resp: string) set the newly created HttpResponse's code to 200 and 404 respectively |
17:17:44 | demi- | does someone want to go ahead and wrap this so i don't have to? :) https://xapian.org |
17:20:05 | * | Trustable joined #nim |
17:22:33 | dom96 | zachcarter: tiobie |
17:23:11 | zachcarter | thank you dom |
17:24:39 | zachcarter | we need Nim back on there |
17:27:02 | Tiberium | it's not even in top 100 :( |
17:36:54 | dom96 | Write more blog articles :) |
17:37:01 | dom96 | and create more Nim websites! |
17:38:46 | * | acidx quit (Remote host closed the connection) |
17:38:58 | * | Tiberium quit (Remote host closed the connection) |
17:39:03 | * | acidx joined #nim |
17:45:38 | demi- | heh |
17:50:14 | FromGitter | <TiberiumN> what can be the reason of failing compilation with vcc? ⏎ CC: stdlib_system ⏎ Error: unhandled exception: the following file can not be found ⏎ ⏎ Additional info: Requested command not found: 'vccexe.exe /c --platform:amd64 /nologo -DWIN32_LEAN_AND_MEAN /O2 /IC:\Users\Tiberius\Nim\lib /IC:\Users\Tiberius\Nim\lib\wrappers\libffi\common /Fonimcache\r_windows_amd64\stdlib_system.obj nimcache\r_windows_amd64\stdlib_ |
17:50:15 | FromGitter | ... error: [OSError] ... [https://gitter.im/nim-lang/Nim?at=590380dacfec91927284b27c] |
17:50:22 | FromGitter | <TiberiumN> but if I run this command manually, it works like a charm |
17:50:27 | FromGitter | <TiberiumN> from the same console window |
17:56:35 | zachcarter | I need a blog I think |
17:56:51 | zachcarter | but I don’t want to use hugo / jekyll, I don’t want another hyde blog |
17:57:02 | dom96 | You can post to nim-lang.org if you'd like :) |
17:57:05 | zachcarter | want something that looks relatively unique |
17:57:13 | zachcarter | hrm maybe I’ll do that |
18:25:14 | FromGitter | <TiberiumN> does nim's httpclient respects system proxy on Windows? |
18:28:20 | dom96 | nope |
18:31:43 | FromGitter | <couven92> @TiberiumN refer to https://github.com/couven92/nim-website/blob/master/jekyll/install_windows.md#building-the-vccexe-tool-with-vcc-from-source for building the vccexe tool. |
18:34:39 | FromGitter | <couven92> @dom96, I am battling with the Windows XP installer now, BTW... Apparently, it's very hard to convince it to talk with the Dell RAID Controller... been at it for two hours now :P |
18:36:48 | dom96 | couven92: sucks that it's taking so long :\ |
18:38:14 | FromGitter | <couven92> But I have my hopes now... I just had to reflash the installer. But I think I got the right drivers included now, so we'll see :) |
18:39:28 | FromGitter | <couven92> Then it's only the ~40 minutes XP needs to install until we're good to go with nim on XP |
18:39:52 | FromGitter | <TiberiumN> @couven92 yeah, I did it myself already, but thanks :) |
18:49:58 | FromGitter | <couven92> Argh! Nope, reflashing the Windows XP installer with the Drivers included didn't work... Hmm... Okay, over to attempt 27 of getting the XP Installer to start! Yaih! |
19:03:32 | * | BennyElg quit (Ping timeout: 255 seconds) |
19:05:20 | * | BennyElg joined #nim |
19:06:24 | * | Arrrr quit (Ping timeout: 260 seconds) |
19:13:04 | hlt | https://forum.nim-lang.org/t/2916 bahahaha this guy |
19:13:10 | hlt | Fungi the fun guy |
19:16:59 | demi- | wow it is almost as though people have no idea how much work is involved in writing a book |
19:18:35 | hlt | no like |
19:18:42 | hlt | go down to like the 3rd or 4th post |
19:19:07 | hlt | Fungi the fun guy really hates compiled languages and has to express it and derail the thread |
19:19:55 | * | Tiberium joined #nim |
19:23:51 | * | BennyElg quit (Ping timeout: 258 seconds) |
19:23:55 | * | BennyElg_ joined #nim |
19:29:45 | ldlework | "collaboration-difficulty of indentation-based syntax" |
19:32:59 | demi- | hlt: yeah, i read that |
19:33:37 | * | zachcarter quit (Ping timeout: 252 seconds) |
19:36:30 | Calinou | what are you installing Windows XP for, @couven92 ? |
19:39:47 | FromGitter | <couven92> Calinou, Araq and dom96 miss a Windows XP machine that we can use to test Nim on Windows XP |
19:41:15 | FromGitter | <couven92> BTW, Attempt 27, 28, and 29 have failed... I am soon running out of ideas! :P |
19:41:21 | FromGitter | <TiberiumN> wtf? |
19:42:10 | FromGitter | <RSDuck> I have a old WinXP laptop ready |
19:43:38 | Calinou | what's the point in supporting Windows XP? |
19:43:41 | Calinou | we're not C++ :P |
19:44:14 | FromGitter | <couven92> Calinou, careful there! Araq is very proud that Nim still supports Windows XP! |
19:44:57 | dom96 | haha |
19:45:09 | pydsigner | Heh |
19:46:00 | FromGitter | <RSDuck> Windows XP isn't uncommon |
19:58:57 | * | BennyElg_ quit (Ping timeout: 240 seconds) |
19:59:21 | * | BennyElg joined #nim |
20:01:26 | demi- | tbh i'd be kinda surprised if it didn't support windows xp, MS didn't deviate that much from how C works, did they? |
20:02:17 | * | rokups quit (Quit: Connection closed for inactivity) |
20:07:41 | Tiberium | dom96, https://github.com/nim-lang/Nim/issues/5757 so I assume this should be fixed now? because it's not |
20:08:05 | dom96 | I don't think so |
20:08:11 | dom96 | zahary hasn't fixed the crash |
20:08:15 | dom96 | just the code that triggers it |
20:09:43 | Tiberium | because it just doesn't work for me even for simplest things: https://gist.github.com/TiberiumN/f83a89a96157e23f2a1bb535b3102f6a |
20:09:51 | * | brson quit (Ping timeout: 258 seconds) |
20:10:07 | Tiberium | ok, I'll wait :) hopefully I don't really depend on that |
20:17:30 | FromGitter | <couven92> Yaih! Attempt 30 failed! :/ |
20:17:45 | BennyElg | what is the language reserved variable to increment? |
20:19:04 | Tiberium | BennyElg, there's no that thing. maybe you're asking about "inc"? |
20:19:07 | Tiberium | it's not a variable |
20:21:12 | BennyElg | I thought nim hold some storage variable you can increment without declear the variable |
20:21:29 | Tiberium | BennyElg, ah, maybe I don't know it :D |
20:21:42 | Tiberium | BennyElg, ah, maybe you're asking about "result" ? |
20:22:13 | BennyElg | the result variable is a defined variable which automaticly initialied to zero? |
20:30:40 | demi- | i actually don't see a definition of result on the language manual page, apart from defining it as the "special result variable" |
20:34:12 | * | Tiberium quit (Remote host closed the connection) |
20:46:23 | * | BennyElg quit (Ping timeout: 240 seconds) |
20:47:09 | * | BennyElg joined #nim |
21:10:10 | * | jsgrant__ joined #nim |
21:12:32 | FromGitter | <couven92> ok, after 32 failed attempt and various hacks I am now giving up on Windows XP for today... Got to get the last bus home now... :P |
21:15:38 | couven92 | I'll continue next week... Maybe I'll try out some things at home over the weekend |
21:21:06 | * | couven92 quit (Quit: Client disconnecting) |
21:22:18 | * | BennyElg quit (Ping timeout: 246 seconds) |
21:22:50 | * | BennyElg joined #nim |
21:25:03 | * | brson joined #nim |
21:32:28 | * | BennyElg quit (Ping timeout: 260 seconds) |
21:34:18 | * | BennyElg joined #nim |
21:41:45 | * | BennyElg_ joined #nim |
21:41:55 | * | BennyElg quit (Ping timeout: 260 seconds) |
21:44:03 | * | gokr quit (Ping timeout: 268 seconds) |
21:45:26 | * | jsgrant joined #nim |
21:47:35 | * | zachcarter joined #nim |
21:48:07 | zachcarter | o/ |
21:48:50 | * | zachcarter quit (Read error: Connection reset by peer) |
21:49:29 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:49:45 | * | couven92 joined #nim |
21:49:56 | * | zachcarter joined #nim |
21:53:39 | zachcarter | dom96: saw your message bout the height thing - ideally I’d like to avoid hardcoding height values |
21:55:42 | zachcarter | stisa: thank you for the PR |
21:58:13 | zachcarter | looking for more css help if anyone is interested! |
22:01:52 | * | cspar_ joined #nim |
22:02:20 | zachcarter | pydsigner: if you’re around :P |
22:02:59 | FromGitter | <stisa> zachcarter: that was euantor's I think, glad you merged it though :D |
22:03:32 | zachcarter | oh lmao I was very confused I was like this looks like a github username for euantor but stisa informed me of it :P |
22:03:35 | * | BlaXpirit is now known as oprypin |
22:03:43 | zachcarter | thank you euantor! |
22:03:53 | * | oprypin is now known as BlaXpirit |
22:04:06 | * | BlaXpirit is now known as oprypin |
22:04:45 | * | oprypin quit (Quit: Bye) |
22:05:15 | * | cspar quit (Ping timeout: 260 seconds) |
22:06:46 | * | BennyElg_ quit (Ping timeout: 240 seconds) |
22:09:11 | * | BennyElg joined #nim |
22:10:41 | * | bjz joined #nim |
22:14:25 | pydsigner | zachcarter: what about height? |
22:14:35 | zachcarter | think I figured it out |
22:16:37 | * | FromGitter quit (Remote host closed the connection) |
22:16:51 | * | FromGitter joined #nim |
22:16:58 | * | oprypin joined #nim |
22:17:47 | zachcarter | http://play.nim-lang.org/ |
22:17:53 | zachcarter | logs should be working now |
22:18:20 | zachcarter | dom96: please lmk what you think |
22:18:31 | * | Trustable quit (Remote host closed the connection) |
22:20:42 | ldlework | program result needs a bottom border |
22:20:55 | ldlework | try to make the left and right sides the same height |
22:21:07 | ldlework | literally can't think of anything else :) |
22:21:30 | zachcarter | yeah this stuff is challenging ugh |
22:21:39 | ldlework | I hate CSS with a passion heh |
22:21:41 | zachcarter | I’m joining the front end team at my job |
22:21:43 | zachcarter | and I hate css |
22:21:47 | zachcarter | what am I DOING WITH MY LIFE? |
22:21:50 | ldlework | heh |
22:22:25 | zachcarter | pydsigner: do you think you could help with these things maybe? |
22:22:49 | couven92 | zachcarter, I just spent 5 unproductive hours arguing with the Windows XP Installer about RAID drivers! So far, I haven't been able to start the installation... :/ |
22:22:53 | zachcarter | I can’t figure out how to get the messages to respect the tile height |
22:23:08 | zachcarter | couven92: your first mistake was using windows :P |
22:23:16 | zachcarter | but your challenge sounds way more annoying than mine |
22:24:10 | zachcarter | I think I’m going to be able to help push for a new language at my job |
22:24:36 | zachcarter | I’d love to get Nim in the running but I think it’s going to end up being golang because of AWS |
22:24:46 | pydsigner | zachcarter: I thought we had this fixed the other day heh |
22:24:53 | pydsigner | Ew Golang |
22:25:01 | zachcarter | I like Golang |
22:25:08 | zachcarter | not as much as Nim |
22:25:37 | zachcarter | pydsigner we fixed it but with a different element |
22:25:48 | zachcarter | I was using notifications not messages (these are bulma constructs) |
22:29:43 | zachcarter | I think maybe I just need some margins? |
22:31:15 | FromGitter | <almynic> what is the nim way instead of using interfaces & multimethods? |
22:31:27 | zachcarter | object variants |
22:31:33 | zachcarter | or use interfaces |
22:31:35 | zachcarter | and methods |
22:31:44 | zachcarter | oh and concepts |
22:32:28 | zachcarter | object variants don’t solve interfaces but they can be substituted for inheritance hierarchies in many cases |
22:33:03 | zachcarter | almynic: what are you specifically trying to do? |
22:33:39 | zachcarter | if you want interfaces and vtables I believe krux02 has a macro out there that allows you to do this |
22:33:40 | pydsigner | zachcarter: why are you using <article> for the output boxes? |
22:33:53 | zachcarter | pydsigner: that’s what the example in bulma used |
22:34:03 | pydsigner | >_> |
22:34:15 | zachcarter | sec |
22:34:31 | zachcarter | http://bulma.io/documentation/components/message/ |
22:35:30 | pydsigner | Well whatever |
22:36:04 | pydsigner | But you want to make sure those two elements have display: flex and flex-direction: column |
22:36:13 | zachcarter | thank you! |
22:37:31 | zachcarter | you are some kind of wizard pydsigner |
22:37:57 | pydsigner | I've done a few flexbox sites |
22:38:01 | FromGitter | <almynic> I'm just trying to understand how a interface or a alternative could be implemented in nim. Let's say we have different types of ducks and every duck has a difference quackbehavior and all ducks need a quack method what is the best way to solve that problem in nim? |
22:38:14 | pydsigner | You learn how these things works eventually |
22:38:20 | pydsigner | * work |
22:38:55 | * | couven92 quit (Quit: Client Disconnecting) |
22:39:38 | zachcarter | concepts almynic |
22:39:56 | zachcarter | or use the interface macro |
22:40:10 | zachcarter | https://nim-lang.org/docs/manual.html#generics-concepts |
22:40:37 | zachcarter | pydsigner: gotcha |
22:40:45 | zachcarter | regardless thank you for the help |
22:40:48 | FromGitter | <almynic> ok thanks |
22:40:53 | zachcarter | almynic: np |
22:45:50 | FromGitter | <stisa> zachcarter were you able to get a nim mode for ace working? |
22:45:59 | zachcarter | nope :/ |
22:46:25 | zachcarter | I tried converting Varriount’s textmate file using the ace tool but it produced a bunch of regexs that were’t JS friendly |
22:46:56 | zachcarter | regex is not my strong suit - I fixed a bunch but there were a few that were throwing me |
22:48:01 | FromGitter | <stisa> I might try to do it tomorrow, but I'm not good at regexes either |
22:48:49 | * | rauss joined #nim |
22:50:26 | zachcarter | stisa: if you do I suggest starting with the converted textmate file |
22:50:29 | zachcarter | it will give you a starting point at least |
22:50:37 | zachcarter | rather than trying to come up with all the regexes and rules by yourself |
22:51:01 | FromGitter | <stisa> following this https://github.com/ajaxorg/ace/wiki/Importing-.tmtheme-and-.tmlanguage-Files-into-Ace ? |
22:51:13 | * | BennyElg_ joined #nim |
22:51:38 | * | BennyElg quit (Ping timeout: 252 seconds) |
22:52:53 | zachcarter | yup |
22:52:58 | zachcarter | let me find the tmlanguage file for you |
22:53:15 | zachcarter | https://github.com/Varriount/NimLime/blob/master/Syntaxes/Nim.tmLanguage |
22:53:25 | FromGitter | <stisa> allright, ty |
22:53:30 | zachcarter | np |
22:57:42 | zachcarter | I need to write a blog article on karax and Nim and web development |
22:58:11 | zachcarter | the fact you can write the front end and back end of a web app in one language and that language not be JS is amazing |
23:00:40 | * | BennyElg_ quit (Ping timeout: 260 seconds) |
23:01:58 | * | BennyElg joined #nim |
23:02:41 | FromGitter | <stisa> zachcarter yeah it's pretty neat |
23:04:00 | zachcarter | well it’s super productive too |
23:04:10 | zachcarter | but def neat |
23:04:39 | zachcarter | the more I think about it the more I can expound upon the benefits of the scenario |
23:16:08 | * | devted quit (Quit: Sleeping.) |
23:22:57 | * | BennyElg quit (Ping timeout: 240 seconds) |
23:25:12 | * | BennyElg joined #nim |
23:27:16 | * | nsf quit (Quit: WeeChat 1.7) |
23:31:09 | * | vlad1777d quit (Quit: Leaving) |
23:35:40 | * | jsgrant__ left #nim (#nim) |
23:39:06 | FromGitter | <Varriount> zachcarter: How does the file size compare of a Nim JS app? |
23:39:58 | * | jsgrant__ joined #nim |
23:40:58 | zachcarter | good question |
23:41:36 | zachcarter | I’d have to write something similar in react or some other front end |
23:42:28 | zachcarter | the nim playground is 102.06kb |
23:44:04 | zachcarter | the minified version of ace editor is... |
23:44:14 | zachcarter | 346.47kb Varriount |
23:45:13 | * | BennyElg_ joined #nim |
23:45:24 | zachcarter | seems pretty good to me |
23:45:31 | * | BennyElg quit (Ping timeout: 240 seconds) |