Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "interpreter"
Costumer: I found a 40 line python script on Stackoverflow to do that.
Dev team: ok, now... how many lines you think we will need to put the python interpreter, libraries and your 40 line script inside an Android and iOS apps with legacy code?4
I may have an unpopular opinion, but I.......
fucking hate these universal programming languages that try too hard to make cross-platform bullshit easy to develop for. THEY PISS ME OFF SO MUCH...
Like, for example:
STOP FUCKING HAVING 2000 BILLION DEPENDENCIES, LIKE WRITE YOUR OWN ORIGINAL CODE AND TRY NOT TO FUCKING MAKE A MONOLITHIC FUCKING MONSTER OF A CODEBASE. I BET SOMEONE WROTE THE ENTIRETY OF GNU UTILS IN JS, WHAT THE FUCK?!
Yea, let's make a platform that everyone needs a fucking VM for. Sounds great. And also fuck OS GUI guidelines and make our own cancerous looking solaris shit UI, yay.
Microsoft: We will make a UNIVERSAL programming language like C++, but with some stuff from Java.
Microsoft: Universal under Windows platforms that is...
Me: go fuck yourself, you greedy cunt. Atleast Apple has the decency to make Objective-C work on non Apple software, unlike YOU. FUCKING CHEAP BASTARD.
I don't have much against it, but having pip seperate from the package manager on Linux (atleast) is annoying as fuck. And also compiling it into a executable would be "THE FEATURE" and not some 3rd party shitty solution that fucking breaks in a year or two.
Come to think of it, people SHOULD FUCKING STOP TRYING TO MAKE A NO-PORTING UTOPIA SOLUTION, BUT INSTEAD FOCUS ON MAKING IT EASIER TO PORT. A little "#define MYFUCKINGOS" wouldn't fucking hurt, you know. Because at the end if you run a VM, interpreter, have a shit ton of dependencies or just are a fucking monopolistic asshole, you're gonna piss off and divide people.
Image source: https://reddit.com/r/...25
Anyone looking for something interesting to do???
Step 1) understand how basic circuitry works on a bread board nothing too fancy. ( Implement NAND, AND, ADDER, SUBTRACTOR)
Step 2) learn about microprocessors and how OS works
Step 3) learn assembly
Step 4)write a basic assembler and understand how loaders and linkers works !
Step 5) write a kernel with very basic features like memory management and process management and some drivers for IO
Step 5) write an emulator for some simple systems .! ex chip-8.
Step 6) read about compiler theory and automata
Step 7) write a basic Python interpreter that compiles (not interpreter) to native assembly.
Step 8) implement TCP stack .
Step 9) learn as much as u can about complexity measurement ), data structures and algorithms using C or C++ it's very important ( familiarity with pointers and thus computer memory )
Step 10) learn any high level language of choice like Python or Ruby.
Step 11) stop debating over tabs vs spaces , emacs vs vim , angular vs vue, php vs Python , OOps vs procedular vs functional ( just know about all of them and when to use but don't fucking debate over which one is superior )..
Step 12) live happily and be healthy.31
My teacher told me not to do a project. He said it was much too hard.
I did it.
2 months pass
And then i come to him with anothec project idea.
Same thing goes, nobody believes in me, but i still succeed.
in the aftermath, i was able to create an interpreter AND a compiler in about 1 year... 😁24
– “It doesn’t work. I don’t know how to run this.”
– “Ok, did you install the Python interpreter?”
– “No, what’s that?”
– “You have to download it from www.python.org. Get the 2.7 version.”
– “Yeah, it’s ok. I’ll just use something else.”9
exit/quit are perhaps the only commands that work on almost all the interpreters. I sometimes enter a new interpreter and type some bullshit that doesn't work. Then I type exit and I'm happy I'm out.
exit !! Thank god !!1
Me reviewing some high school level exams after an Excel course.
"hmmm the next question is 'what does the symbol $ mean when found inside a FORMULA in Excel' ... Let's see what they answered..."
* "it's the symbol for DOLLARS" <-- well, he tried
* "I don't know" <-- mmh ok, he doesn't know
* "it can be either a plus or a minus" <-- mmmh maybe the interpreter will just figure out the correct one
* "it's used to keep an index fixed when you copy/drag the formula" <-- nice, someone who actually followed the lesson or at least knows how to google things when the teacher doesn't see
* "it's the symbol for POUNDS" <-- WTF!! Wait a moment: POUNDS???? Have you ever lived a single moment in this world?
Books and command lines.
I don't like teachers.
I think it's because my learning process is very async and chaotic. When I see a snippet in Golang, I relate it to PHP, Rust and Haskell. I jump to resolving the problem in other languages, trying to find out which approaches work in Go.
Then I read about some computer science concept on Wikipedia and get lost in that while my hunger for knowledge and food increases. After a while I look up a recipe for a pasta salad, and while cutting bell peppers, I see the recipe in terms of typed morphisms, I sprinkle and intersperse ingredients through mapping functions, then decide to write an interpreter for the esoteric "Chef" language in Go so I can interpret my salad recipe while eating it.
Voila, I'm learning Go.
I have no patience for linear mentoring, and others have no patience for mentoring me.
But that's OK.1
I'm working on a programming language with a "bytecode" interpreter and a compiler that translates source code to said bytecode and... it sort of actually works!
I want to recreate an Erlang-style environment, currently you can write functions, call C++ functions via wrappers, have immutable-only values, and it has no explicit control structure apart from statement sequencing and the if-expression because I want to make it as functional as possible. Next thing on the list is to add a green threads implementation and ability to spawn and send messages to processes.
Still a WIP and heck even design-in-progress.
Now for the rant:
I'm using CMake for building C++ (interpreter) and Stack for Haskell (compiler) and I've been trying to get them to talk to each other for hours because I want CMake to manage the Stack build too and shove all the executables into one place. CMake documentation is weird and Stack isn't too helpful either, so I guess I'll just spend another few hours trying to get Stack to fuckin reveal its build directory to CMake and/or build to a given directory. Ugh.9
Got home from work and found this Python at my doorstep, I cringed initially but remembered I write Python, so I said "Hey! Where's your interpreter?"5
Bonus points if you also wrote it in a language entirely new to you, or even in entirely different paradigm. (In my case Haskell.)11
My first work was a paid internship.
My first couple weeks on the job I was supposed to be working on the same machine with another dev to get the gist of the process and everything. Kind of pair programming mixed with mentorship. Sounds cool?
Yeah... Problem is my fellow dev was more interested in spending around 80% of her time chatting around with her boyfriend and friends on Microsoft Chat.
Anyway, I soon got bored of having to look to the other side all the time, and went to our boss and asked for some other stuff to do "because I'm better learning by doing than by example".
Almost 20 years later, I'm still in touch with this dev... But she soon left the job and pursued a career as a translator and interpreter. She was always more interested in talking than programming 😃1
And fUCK ME WHY NOT PYTHON?? It's a weak typed but dynamic language that FORCES good indentation and actually has ACCESS TO THE FILE SYSTEM instead of just the web APIs that don't let you do SHIT compared to what you SHOULD learn.
Fuck you Stanford, I expected better you shitty cockmunchers.28
EEEEEEEEEEEE Some fAcking languages!! Actually barfs while using this trashdump!
The gist: new job, position required adv C# knowledge (like f yea, one of my fav languages), we are working with RPA (using software robots to automate stuff), and we are using some new robot still in beta phase, but robot has its own prog lang.
- this language is kind of like ASM (i think so, I'm venting here, it's ASM OK), with syntax that burns your eyes
- no function return values, but I can live with that, at least they have some sort of functions
- emojies for identifiers (like php's $var, but they only aim for shitty features so you use a heart.. ♥var)
- only jump and jumpif for control flow
- no foopin variable scopes at all (if you run multiple scripts at the same time they even share variables *pukes*)
- weird alt characters everywhere. define strings with regular quotes? nah let's be [some mental illness] and use prime quotes (‴ U+2034), and like ⟦ ⟧ for array indexing, but only sometimes!
- super slow interpreter, ex a regular loop to count to 10 (using jumps because yea no actual loops) takes more than 20 seconds to execute, approx 700ms to run 1 code row.
- it supports c# snippets (defined with these stupid characters: ⊂ ⊃) and I guess that's the only c# I get to write with this job :^}
- on top of that, outdated documentation, because yea it's beta, but so crappin tedious with this trail n error to check how every feature works
The question: why in the living fartfaces yolk would you even make a new language when it's so easy nowadays to embed compilers!?! the robot is apparently made in c#, so it should be no funcking problem at all to add a damn lua compiler or something. having a tcp api would even be easier got dammit!!! And what in the world made our company think this robot was a plausible choice?! Did they do a full fubbing analysis of the different software robots out there and accidentally sorted by ease of use in reverse order?? 'cause that's the only explanation i can imagine
Frillin stupid shitpile of a language!!! AAAAAHHH
see the attached screenshot of production code we've developed at the company for reference.
Disclaimer: I do not stand responsible for any eventual headaches or gauged eyes caused by the named image.
(for those interested, the robot is G1ANT.Robot, https://beta.g1ant.com/)4
When I was about 10 I tried to make a basic midi sequencer/synthesiser using just the python standard library.
The only sound production there was was winsound.beep, which played a sine wave at the frequency given.
I realised that if I put enough really short beeps together I could make some mildly convincing instruments - I remember an electric piano, acoustic guitar, some kind of bass synth, and maybe more?
Then I put them together to make a song. The problem was though that you can't play multiple notes together as winsound.beep was blocking (though I didn't understand that at the time).
I had no knowledge of threading or async so I opened multiple python interpreter instances to play multiple channels. That's how I learnt about command-line arguments!
But I really struggled to get the sounds to be in time because python is not exactly rapid.
I made a kind of note sequencer using a library called easygui, based on tkinter (TCL wrapper), and I remember being told off at school for bringing in a usb stick with the exe of my program that I made with py2exe.
So many old technologies and fond memories...2
The myth about the missing semicolon. I don't get it, if your editor doesn't pick it up, the compiler og interpreter will. How is this a common problem?4
The year was 1983. My best friend and neighbour at the time invited me over to see an amazing device that his father had brought home from work, an IBM PC. We played a game called Track & Field, and I was amazed that the machine remembered my name once I've entered it. (Uptil then the only machines with any kind of memory that I've come in touch with, were arcade games and my cousin's video game console, which was also the first electronic gaming device I've ever played, back in 1978). In the early 1980s, computers were anything but commonplace in Åland Islands, but I think that it was in 1983 that people became aware of them, and there was a budding interest to buy one, at least among us kids. It was my sister who wished for a home computer for Christmas, so the same year Santa gave us a ZX Spectrum. It came with a game called Thro' the Wall, an Arcanoid clone(, that has inspired me to make my own clone "Wall" for all the different home computers I've had, ranging from Commodore 16 and Canon V-20 to Amiga 500 and Amiga 1200). Unfortunately, we only managed to load the game (delivered on a C cassette) like once or twice after several attempts. It turned out that the hardware was faulty and dad got a refund after first having had to complain a lot at the dealer (which went out of business some ten years ago), and then bought the Commodore the next Christmas. Anyway, I wrote my first code on the ZX Spectrum. It doesn't really count for programming as all I did was typing examples and running them. I do recall altering one example though, a program drawing the Swedish flag on the screen, by adding an inner red cross thus turning it in the Åland flag. But, with the Commodore 16 (which had an excellent Basic interpreter) I got started with programming almost immediately and by the end of 1984 I had written my fist very own Basic programs. In 1996 I got my first IT job, and am still a dev. So, what became of my childhood friend and neighbour? He runs a successful computer dealership :)
Fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fucking python interpreter versions !
I feel better now.2
So.... yeah, making a Scratch clone (with more features) is frustrating and super hard.
Major problems include
- Drag&Drop from listbox to usercontrol - stress level : 3/10
- connect blocks when two blocks are close to each other - stress level : 10/10
- generate live code when there was a change in blocks editor - stress level : 9/10
- write a compiler or some interpreter that converts block code to real c# code - stress level : 10/10
- generate output by calling csc.exe - stress level : 1/10
- make code at least readable - stress level : 7/1014
Was forced to do some work on Windows this week (CAD tools that runs only on Windows). I spent a few days just setting up the tools. There were quite a few things I realized I forgot about Windows (as compared to Linux).
1) Installation times are down right horrific. What exactly are the installer doing for 10 minutes?
2) .NET is a cluster fuck. Not even Microsofts repair tool can fix it, but rather just hangs. I ended up using another tool to nuke it and reinstall.
3) Windows binary installs are insanely huge, thus, takes forever to download.
4) The registry is a pointless database that must have been written in hell with the single intent of destroying users will to live. The sole existence of the registry is another proof that completely incompetent engineers designed Windows.
5) Rebooting is the only way to solve many problems. This is another sure sign of a fundamentally fucked up OS design.
6) What the heck is wrong with the GUIs designers? The control panel must be the worst design ever. There are so many levels to get to a particular setting I'm getting dizzy. Nothing gets better by the illogical organisation.
7) Windows networking. A perversion of the tcp/ip stack that makes it virtually impossible to understand a damn thing about the current network configuration. There are at least 3 different places that effects the settings.
8) Windows command prompt. Why did they even bother to leave it in? The interpreter is as intelligent as retarded donut. You can't do anything with it, except typing "exit" and Google for another solution.
8) Updates. Why does it takes hundreds of updates per month to keep that thing safe?
9) Despite all updates that is flying out of Redmond like confetti, it is still necessary to install antivirus to keep the damn thing safe. That cost extra money, and further cost you by degrading performance of your hardware.
10) Window performance. Software runs like it was swimming in molasses. The final stab in the back on your hardware investment, and pretty much sends performance on your hardware back a few hundred bucks more.
11) Closed source is evil. If something crash consistently, you might find a forum that address the issues you have. Otherwise you're out of luck. On the other hand, it might be for the better. I imagine reading the code for Windows can lead to severe depression.
I'm lucky to be a Linux dev, and should probably not complain too much... But really, Windows, go get yourself hit by a truck and die. I won't miss you.14
So, this is probably somewhat esoteric but...
While studying at university I had a "programming paradigms" module, dunno why they called it that, it was more like "introduction to functional programming".
So, it's kinda mind bending, we'd only really started to get our heads around classical object oriented programming and they throw functional programming at us.
It's worse than that though, for do they use an established language, like lisp/scheme, functional Python, or even given Haskell?
No, of course they didn't. They taught us Oz.
You probably won't have heard of it, but this language is burned into the back of my brain, along with a vague understanding of the n-queens problem we had to solve graphically (using qTk, which I dunno if someone took qt and tk and blended them, I stopped asking questions after a while).
To top it off did this language (at the time) have a stand alone interpreter? Did it buggery! It was coupled to the Mozart programming system, which is just Emacs (which has a bloody lisp built into it,so close, yet so far 😭).
It gets worse, though, oh does it get worse, for pause dear reader and consider, have you ever heard of Mozart/oz before, I'd put money on most of you had not heard of it until today.
For, you see, I believe at the time of writing, one, yes, ONE text book exists on this language. When I was doing my assignment there was merely some published conference notes and language design documents.
That's not all, I was not the only one experiencing difficulties with this language, someone in the class ended up pouring through the mailing lists and found the very tutor teaching the class struggling at first to understand the language.
I had to repeat that year. The functional programming class was one semester.
When I retook that year, it was a whole year long. However, halfway through the year, original tutor was fired and a new tutor was hired to teach the language.
He was, understandably, just as confused as we were.
There was a Starbucks and a pub equidistant from the lecture hall, though in opposite directions. From lecture to lecture we had no idea which one we'd end up in.
I have reason to believe Mozart/Oz it some sort of otherworldly abomination designed to give students the occasional nightmare flashback, long after they've left.
My room had post it notes, sheets of paper, print outs, diagrams, doodles and pens, just stuck to the wall, I looked like a raving lunatic three hours away from being institutionalised. There was string connecting one diagram to the next and images of a chess queen all over. As I attempted to solve the n-queens problem.
Madmans knowledge, I call it. I can never unlearn all that, in fact it seeps into much of the code I write. Such information was not meant for the minds of a simple country bumpkin such as myself...
Mozart/Oz... I wouldn't be the programmer I am today without it, and that's frankly terrifying...10
My best dev-memories of 2016??
First in february I won a competition (Jugend - Forscht) in which i had programmed an interpreter. And then, the first time my selfmade compiler actually printed hello world...
Do you know what i fucking want for christmas, a fucking flamethrower, so i can burn all this shit down. I have spend like 2-3 days on trying to figure out why my variables in my script language i am working on isnt working, found out it was because of a fucking space so instead of getting the data of "var1" it would get it like "var1 ". This is one of the moments i feel like the biggest idiot on this planet. I feel so incompetent right now. 😂🤣😓😢😭5
Compiling software on Linux:
Python interpreter? Easy peasy, just some dependencies here and there. Make does a good job.
Linux kernel? Piece of cake, 20 years of development will be freshly served on your machine after one hour compiling (I have a pretty powerful computer).
Tensorflow? Fuck this shit I am outta.
What is your story with self-built software? Which piece of code has the most terrible dependency hell?9
!rant Eeeeeeeeee!!!! The interpreter can now handle floats and integers! And accept the power operator! And modulo! (Sorry, absurdly excited)2
Does anybody find that different styles of programming suits their personality better?
I've put a lot of effort into learning Rust. I think it's type system is fantastic. But after trying to make a basic programming language interpreter in it, I found Rust too complex. I kept struggling to express my types correctly, so I spent more time trying to understand the language instead of designing and writing my program.
Now consider Go. It has some overlap in programming domains with Rust. It has almost none of the high level features of Rust baked in e.g. iterators. It's approach to programming is very imperative and procedural like C before it. If you want abstractions you will have to make them yourself. As someone who enjoys understanding the details I appreciate this step by step approach and its comparatively simple language design.
What do you think? Do you think certan programming languages are more suited to different personalities?18
1. Build a language interpreter from scratch. Without any tool like Gnu Bison
2. Get comfortable with modern C++
3. Find an internship related with operating systems or other similar areas.1
I've created an interpreter that I am very proud of :)
It's based off the variation of Scheme(I think, maybe just Lisp) called Lel.
So my language is like a variation of a variation of Lisp... Written in an Interpreter(Python).
I've got a wiki, and source code on GitHub:
Thanks for any feedback. And help appreciated!11
Last night, while under the full belief that I could write a very simple lisp interpreter, I was awake until stupid o'clock and to my credit I got the tokenizer working and produces an output of parsed code. It's really basic but I was pleased to have gotten anything correctly parsed at that time.
But I'm also sitting outside my apartment waiting for a locksmith because lack of sleep left me unprepared to function correctly today and I'm now locked out...
Well done me!
You know how sometimes if you mistype a filename in Bash, it corrects your spelling and runs the command anyway? Such as when changing directory, or opening a file.
I have invented Suicide Linux. Any time - any time - you type any remotely incorrect command, the interpreter creatively resolves it into rm -rf / and wipes your hard drive.
It's a game. Like walking a tightrope. You have to see how long you can continue to use the operating system before losing all your data.
Please install: https://qntm.org/suicide9
Sometimes I think "I should write a meaningful error message for this exception" and then i remember how useless 99% of the error messages of every compiler / interpreter I've ever had to use and decide "msg ='something went wrong'" is good enough.3
Be me at work, 12h nights shift, 4th day like that
Following online course on machine learning, instructor says we'll use python 3.x as the interpreter for the project, boot personal laptop and start pycharms, create the file, choose right interpreter no big deal
pip install the modules I need for the course - done, try to import them.
Doesn't work, first reboot, still not working, browsing Internet for answers, no ideas, reboot again (you never know) reload pycharms, browse Internet again, find out the modules only work on python 2.7.
Wasted 45minutes for this shit
Feels good bro.2
For a project (cross platform desktop applicatiom) I'll be starting tomorrow, I'll need to import code from a file at runtime. I still have no Idea, how I should do it. I'm considering two options;
1. Writing a simple interpreter and writing it in cpp with QT of Java Swing.
2. (easier) Write an electron app. The problem is: I hate JS.
2. find some way, to do it not with JS.6
Challenge: please install all incompatible versions of all compilers and interpreters for all languages in a single VM. I want python2, python3, gfortran, clang, gcc, jdk 1, java se 10, php5.5, php7, cuda 1, cuda 7, glsl 110, glsl 460, brainfuck, piet, and so on. I'd like to readily parse and run any symbolic representation devised over the 70 years since Plankalkül. I'd just like each language version in a neat little directory with its own properly configured compiler/interpreter, package managers, and libraries. Thanks in advanced. Monday is fine.3
Over the summer I was recruited to be a supplement instructor for a data structures course. As a result of that I was asked (separately by the professor) to be a grader for the course. Because of pay limitations I've mostly been grading homework project assignments. In any case, it's a great job to get my foot into the department and get recognized.
Over the course of the semester I've had this one person, OSX, named after their operating system of choice, who has been giving me awkward submissions. On the first assignment they asked the professor for extra time for some reason or the other, and that's perfectly fine.
So I finally receive OSX's submission, and it's a .py file as per course of the course. So I pop up a terminal in the working directory and type "python OSX_hw1.py". Get some error spit out about the file not being the right encoding. I know that I can tell python to read it in a different encoding, so I open it up in a text editor. To my surprise it's totally not a text file, but rather a .zip file!
I've seen weirder things done before, so no big deal. I rename the file extension, and open it up to extract the files when I see that there's no python files. "Okay, what's goin on here OSX..." I think to myself.
Poking around in the files it appears to be some sort of meta-data. To what, I had no clue, but what I did find was picture files containing what appeared to be some auto-generated screenshots of incomplete code. Since I'm one to give people the benefit of doubt even when they've long exhausted other peoples', I thought that it must be some fluke, and emailed OSX along with the professor detailing my issue.
I got back a rather standard reply, one of which was so un-notable I could not remember it if my life depended on it. However, that also meant I didn't have to worry about that anymore. Which when you're juggling 50 bazillion things is quite a relief. Tragically, this relief was short lived with the introduction of assignment 2.
Assignment 2 comes around, and I get the same type of submission from OSX. At this time I also notice that all their submissions are *very* close to the due time of 11:59pm (which I don't care about as long as it's in before people start waking up the next morning). I email OSX and the professor again, and receive a similar response. I also get an email from OSX worried about points being deducted. I reply, "No issue. You know what's wrong. Go and submit the right file on $CentralGradingCenter. Just submit over your old assignment".
To my frustration OSX claimed to not know how to do this. I write up a quick response explaining the process, and email it. In response OSX then asks if I can show them if they comes to my supplemental lesson. I tell OSX that if they are the only person, sure, otherwise no because it would not be a fair use of time to the other students.
OSX ends up showing up before anyone else, so I guide them through the process. It's pretty easy, so I'm surprised that they were having issues. Another person then shows up, so I go through relevant material and ask them if they have any questions about recent material in class. That said, afterwards OSX was being somewhat awkward and pushy trying to shake my hand a lot to the point of making me uncomfortable and telling them that there's no reason to be so formal.
Despite that chat, I still did not see a resubmission of either of those two assignments, and assignment 3 began to show it's head. Obviously, this time, as one might expect after all those conversations, I get another broken submission in the same format. Finally pissed off, I document exactly how everything looks on my end, how the file fails to run, how it's actually a zip file, etc, all with screenshots. That then gets emailed to the professor and OSX.
In response, I get an email from OSX panicking asking me how to submit it right, etc, etc. However, they also removed the professor from the CC field. In response I state that I do not know how to use whatever editor they are using, and that they should refer to the documentation in order to get a proper runnable file. I also re-CC the professor, making sure OSX's email to me is included in my reply.
OSX then shows up for one of my lessons, and since no one had shown up yet, I reiterate through what I had sent in the email. OSX's response was astonished that they could ever screw up that bad, but also admits that they had yet to install python(!!!). Obviously, the next thing that comes from my mouth is asking OSX how they write their code. Their response was that they use a website that lets them run python code.
After that I finally get a submission for assignment 1!
I recently started learning Erlang. This is the story of how I got trapped into it.
When I code, I usually use my trusty text editor and a terminal to either compile my code or run tests in the language interpreter. The interpreter, erl, works fine, but when I wanted to close it, I ran into a small issue.
Because I never know what the command is to close an interpreter, I usually use the EOF character (^D), that is widely recognized. Except erl does not react to it, not even a tiny message saying it won't close or doesn't recognize the output.
Alright then, let's try quit. That's an atom, it does not behave how I want.
quit() is an undefined shell command, exit() terminates the shell process but the interpreter automatically starts a new one...
But I get the welcome message, telling me to abort with ^G! Some progress, finally... except ^G redirects from Erlang interpreter to user switch command. Damn, another interpreter...
I ended up killing the process from an other terminal.4
Editor, interpreter and debugger of sorts for esolang Piet
There's lots of room for improvement but it was fun to implement4
Anyone able to link me to some good reading material on compilers, interpreters, emulation and CPU design?
Keen to actually get some of this knowledge under my belt, don't mind if it requires a little investment as long as it isn't written in (fucking) python, preferably C if anyone knows of anything.
Thanks guys! :-D11
So decided to take a step back and build an interpreter for a custom version of BASIC for the cosmos kernel and a way to learn python but can we just take a moment to admire how BASIC is designed...
It is such a well designed, open and malleable language to design for specific needs...
Except visual basic, fuck visual basic, fuck it with a rake...4
Does anyone else get triggered when you use the python socket .recv() and the server does not return anything so the program just stays there indefinitely? For me, I can't even Ctrl+C it so I have to close the entire window. It's especially annoying when I start a server in the interpreter (quite a bit of lines) and I have to rewrite it afterwards.7
Good evening programmers, IT's, devranters and memeians.
I would like to use a little bit of your collective conciousness - the hive mind if you will.
I've been working on my automation system for quite a while and I've received some exposure from non-programmers - which resulted in more questions than suggestions.
I would like to ask you guys to give me some suggestions as to what I could add to my system.. that is, if you have time..
The program in short (if you don't want to read the readme file) is an automation system scriptable in pure Lua.
It utilizes Selenium for web automations, NAudio for audio operations and Moonsharp as an interpreter.
While my tester friends say that they use it for the actual testing, I myself found it very useful in writting bots (for browser games for example).
Here's the github link: https://bit.ly/2GDu92g
Thanks a ton!
PS. Here's an unrelated image to draw your attention.6
Today I watched "the birth and death of js":
Here Gary Bernhardt talks about compiling executables to asm.js and about running the compiled files using a js interpreter that can be included in the kernel.
Eventually, some responsibility can be moved from the kernel to this interpreter, responsibility like virtual memory and trap management.
This speech aims to be fun, so not everything should be taken seriously...
...this trick seems to be a nice idea, and projects like Node OS work likewise.
So now, would you even consider this? Or is it just something that will be nothing more than craziness of a mad man?1
What's the strangest Assembler or Pseudo-Assembler you've ever encountered?
I wrote a Z-machine (Infocom's virtual text adventure interpreter) and it was quite an interesting interpretation of bytes:
- The first 3 bits of an instruction tell you the opcode category, the rest are the instruction
- The 2nd (and maybe 3rd) byte tell you in 2-Bit chunks the operand types.
- text is encoded in 5-Bit chunks, with special characters for CapsLock that double function as padding (if your text doesn't align with the 3 letters per 2 bytes).
- and of course there are 5 different versions that all work slightly differently (as in CapsLock becomes Shift or "this special character isn't in use anymore")3
I'm studying atm and I survived Haskell, SKI, ... now, in the second semester we started with Python (yeay ♡) and Java (that's fine).
One of the first exercises is about installing Jython ('cause it's good, right? /sarcasm off), using the lecturer's module and write some code for it. It's about painting some shitty graphics *gasp*...
I use PyCharm (not really necessary for these crappy exercises) and programming on Windows and/or Linux.
Downloaded Jython, installed it, set it as interpreter - works fine (win10, pycharm).
Some students got weird errors using linux - for me it's the same but meh Idc.
Today I tried using Jython on my notebook, too (win10, pycharm). Downloaded it from the Jython Project website. Can't update pip, can't run modules - error is about fckin charsets...
Some other student figured out - wrong version of Jython. The newer version has some bug fixes.
2.7.1 is the one and only - the download section of their website offers 2.7.0 as latest release...
So - how to know there is a version 2.7.1?
#1 version control website = Wikipedia
So... there is a blog, guy's writing about this release - this installer is hosted at maven central. Yeay. Obvious. Thanks.
Can't describe such stupidity - maybe it's the user again 😂
Ahhh i don't even want to remember... Dynamic text interpreter that will translate a PDF+excel to a dynamic data structure that will accommodate any changes... Where is my gun again?!
Can you name any esoteric programming language that has a minimal number of 'keywords' and its interpreter can be designed simply?
For example BrainFuck programming language.5
"Programming is a craft. At its simplest, it comes down to getting a
computer to do what you want it to do (or what your user wants it to do). As a programmer, you are part listener, part advisor, part interpreter, and part dictator. You try to capture elusive requirements and find a way of expressing them so that a mere machine can do them justice. You try to document your work so that others can understand it, and you try to
engineer your work so that others can build on it. What's more, you try to do all this against the relentless ticking of the project clock. You work small miracles every day.
It's a difficult job. "
- The pragmatic programmer
That feeling when you're applying for your first programming job.
And the knife stabs of nerves in your gut fearfully remind the coiled muscles in your sweaty brow of the singular possibility: what if I bullshit my way by the HR filter into this job and it turns out I was completely wrong, and I encounter a bug that my meager coding abilities really can't fix?
"Writing an interpreter in some community college you dropped out of ten years ago" doesn't mean you're a programmer.
"Figuring out where the bug was in a broken bat file that was pages long, for a language and framework you've never used, for a library nobody uses anymore", doesn't count as debugging.
"Writing a tweening library in an obscure tool" doesn't mean you're an expert. This is childs play.
What if they ask about big O? Do you admit that logarithms confuse the fuck out of you because you dropped out in 8th grade and got your GED later on due to being kicked out by your meth head dad?
What if being able to write a few measly cobbled together half-arsed estimate tools in python doesn't really mean you're qualified to do anything?
What if being able to look at code in languages you've never seen and grok it doesn't mean shit?
What if you've used more languages than you can remember?
What if you once lost a job offer casually given because the guy you built rapport with over months made a joke about browsers, and you joked about using internet explorer?
What if you thought you could, but you'd been raised your entire life to *believe* you couldn't?3
Started work on a language interpreter and all is going well, until I realise I still need to implement a way of reading and executing code blocks and work out if statements... Ah fuck...11
I remember coding a hierarchical website crawling interpreter without using TDD in a library class.
Standing whole day in the flat, think about the working code have to be written.
It was like:1
Last year, I made an application of A* maze-solving algorithm in class. I used a linked list and my friends used arrays. Their algorithms were way faster than mine (I remade it later :p).
OK I understand that accessing memory by address if way faster than accessing by iterations, but I also see that python lists or C# lists are really fast. How is it possible to make a list performance-proof like this? Do the python interpreter make a realloc each time you append or pop a value?1
I am some Kind of angry right now.
Some of you may know the App "Jodel" (for those who don't: it is an app which lets you talk to strangers at in your city/near your location)
I am in an informatics-Channel and I feel a bit annoyed.
Someone just said that in js you can do any shit and it works.
- you can leave out semicolons. wow.
Another one meant that one problem is the unlogical backwards-conpatibility. "You have to look if the script is running on the browsers and on your engine."
- Isn't that part of any programming language? To see if it works?
I don't know what to say right now.
Uhm btw.: Can someone explain me, what he meant with "engine"? I mean there is an interpreter, but "engine"?!10
I already built a compiler and an interpreter.
ONLY ON THE THIRD TRY I realize that the hard part is the language design. lets hope Gerlang3.0 will turn out usable lol
PS: I hate apes2
How meta will it be when I get close to finishing the interpreter for the language I'm building, and I use my OWN language for all my future projects?2
Fuck me. Looks like You're back my old enemy, nodejs. Now I have to rewrite my c++ backend in node, because I need scrip ting support and I will not write an interpreter. Plus nuxtjs is there.
At least I improved my c++ skills a bit.
Still 12+ hours for not much.4
Lua users, have you used moonscript?
It's a little language that has it's own interpreter or can be compiled down to Lua and it's absolutely lovely (currently using it with Love2d).
Of course, as with most things, what I love about it also royally pisses me off sometimes.
For starters local has to be declared for variables, unlike lua.
Otherwise the variable goes to _
Also note, that some tutorials literally tell you the opposite.
all variables are local by default
unless you don't declare them
then they go to _ (throwaway)
Some tutorials get this wrong too.
all variables have to be declared local
except tables. failure to declare a table WITHOUT a local will cause things like
table.insert to fail with "nil" values for no god damn reason.
No tutorial I could find mentioned this.
Did you know we call methods with '\'?
By the way, we call methods with '\'.
Why? Who the fuck knows.
Does make writing web routes more natural though.
Variables in the parameters of new are declared and bound for you. Would have loved to know this before hand instead of trying
to bind to them like a fucking idiot.
Fat arrows are used to pass in self for methods.
Unless you're calling a method. Then you use backwards slash. This fact is unhelpful when you're a beginner and dealing with the differences between the *other* arrow, the backslash, the fat arrow, and the fact that functions can be called with or WITHOUT parenthesis.
And on that note..
While learning all this other shit, don't forget parenthesis are optional!
Except when they're not!
..Like when you have a function call among your arguments and have to disambiguate which args belong to the outer call and to the inner call! Why not just be fucking consistent?
But on the plus size, ":" is now used for what it should have been used for in the fucking beginning: binding values to keys.
And on the downside, it's in a language thats built on top of another language that uses it for fucking *method calls*, a completely
different fucking usage.
And better still, to add to that brainfuckery thats lost in the mental translational noise like static on a fucking dialup modem, you define methods with the fat arrow. Wait, was that the single arrow or fat one? Yeah the fat one. Fuck. But not before you do THIS shit..
yeah, you STILL include the god damn colon just so when you're coming from lua you can do a mental double take. "Why am I passing self twice? Oh right, because fuck me, I decided to use moonscript." It's consistent on that front but it also pisses me off.
A lot of these are actually quality of life improvements disguised as gotchas, but when you're two beers in to a 30 minute headscratcher it sure doesn't fucking feel like it.
Nevertheless, once I moved beyond the gotchas, it was like night and day. Sure moonscripts takes a giant steaming dump all over the lua output, like a schizophrenic alcoholic athena from the head of zeus, but god damn, when it works it just WORKS.
Locals that act like locals? Check.
Sane OOP? Check.
Classes, constructors, easy access to class methods, iterators? Check, check, check, check, check.
I fucking hate ceremony. Configuration over convention is for cunts. And moonscript goes a long ways toward making lua less cunty.
If you've ever felt this way while using lua, please, give moonscript a try.
You'll regret it, but in a good way!6
My work product: Or why I learned to get twitchy around Java...
I maintain a Java based test system, that tests a raster image processor. The client is a Java swing project that contains CORBA bindings to the internal API of the raster image processor. It also has custom written UI elements and duplicated functionality that became available in later versions of Java, but because some of the third party tools we use don't work with later versions of Java for some reason, it's not possible to upgrade Java to gain things as simple as recursive directory deletion, yes the version of Java we have to use does not support something as simple as that and custom code had to be written to support it.
Because of the requirement to build the API bindings along with the client the whole application must be built with the raster image processor build chain, which is a heavily customised jam build system. So an ant task calls out to execute a jam task and jam does about 90% of the heavy lifting.
In addition to the Java code there's code for interpreting PostScript files, as these can be used to alter the behaviour of the raster image processor during testing.
The server isn't much better though. It's a tomcat based application that was written by someone who had never built a tomcat application before, or any web application for that matter and uses raw SQL strings instead of an orm, it doesn't use MVC in any way, and insane amount of functionality is dumped into the jsp files.
It too interacts with a raster image processor to create difference masks of the output, running PostScript as needed. It spawns off multiple threads and can spend days processing hundreds of gigabytes of image output (depending on the size of the tests).
We're stuck on Tomcat seven because we can't upgrade beyond Java 6, which brings a whole manner of security issues, but that eager little Java updated will break the tool chain if it gets its way.
Between these two components we have the Java RMI server (sometimes) working to help generate image data on the client side before all images are pulled across a UNC network path onto the server that processes test jobs (in PDF format), by reading into the xref table of said PDF, finding the embedded image data (for our server consumed test files are just flate encoded TIFF files wrapped around just enough PDF to make them valid) and uses a tool to create a difference mask of two images.
This tool is very error prone, it can't difference images of different sizes, colour spaces, orientations or pixel depths, but it's the best we have.
The tool is installed in both the client and server if the client can generate images it'll query from the server which ones it needs to and if it can't the server will use the tool itself.
Our shells have custom profiles for linking to a whole manner of third party tools and libraries, including a link to visual studio 2005 (more indirectly related build dependencies), the whole profile has to ensure that absolutely no operating system pollution gets into the shell, most of our apps are installed in our home directories and we have to ensure our paths are correct for every single application we add.
And... Fucking and!
Most of the tools are stored as source bundles in a version control system... Not got or mercurial, not perforce or svn, not even CVS... They use a custom built version control system that is built on top of RCS, it keeps a central database of locked files (using soft and hard locks along with write protecting the files in the file system) to ensure users can't get merge conflicts by preventing other users from writing to the files at all.
Branching is heavy weight and can take the best part of a day to create a new branch and populate the history.
Gathering the tools alone to build the Dev environment to build my project takes the best part of a week.
What should be a joy come hardware refresh year becomes a curse ("Well fuck, now I loose a week spending it setting up the Dev environment on ANOTHER machine").
Needless to say, I enjoy NOT working with Java. A lot of this isn't Javas fault, but there's a lot of things that Java (specifically the Java 6 version we're stuck on) does not make easy.
This is why I prefer to build my web apps in python or node, hell, I'd even take Lua... Just... Compiling web pages into executable Java classes, why? I mean I understand the implementation of how this happens, but why did my predecessor have to choose this? Why?2
So I've been toying lately with an idea for a programming language. I have an example file with everything I could think of written in it's syntax (available here: https://gist.github.com/draganczukp...). The language currently has no name and no compiler/interpreter.
What do you guys think? Would you use it as is? After some tweaks? Or maybe not at all?
Do any of you have any resources about writing a compiler/interpreter from scratch?3
I use the Parrot OS linux distro and I think my built in python interpreter is broken, when I run a .py program from the command line, I get errors that I don't get when I run them in pycharm, why is this happening?8
That feeling when you sit down and finish a final project for a class in one night 😎
☑️ Turing Machine Interpreter2
The time when I started building my first interpreter. I had no idea about them so I just copied the code from the book but it felt good really good and I learned so much about compiler and interpreter design. I guess copying the code and seeing things connect was the best and badass experience for me.
i've installed lamp and my php -v is 7.1.15. i created a form and when i request to a .php file, it says "php-cgi not found: Please ensure that configured PHP Interpreter built as CGI program (--enable-fastcgi was specified)".
but ive specified the php.ini file from etc/php/7.1/cli.
and in setting/languages & Frameworks/php/cli interpreter it says php version not installed & debuger not installed. SOS3
How do you guys deal with the anxiety of everything just going to shit? I keep having this feeling that my applications are held together by paper clips and chewing gum.
Not just my code, but the language, framework, compiler/interpreter, OS, and the hundreds of libs holding it all together. Like.. really? If this was a physical building, I would not want to live in it! haha3
Ok so I'm about to start working on an OS but I am going to run through a few tutorials to get the base systems down then I'll incorporate a interpreter for BASIC and my custom scripting language.
Just curious if anyone can point me in the direction of a few well written tutorials that will explain the systems being used. (I want to use Assembly and C only btw, but am open to others)
I only have 1 decent tutorial but it's older and complete (https://github.com/cfenollosa/...)3
Way back in the good old DOS days a replacement for command.com with command history and a batch interpreter
Ok so Im doing a project about interpreters for college, and need people to answer questions for it.
If youve ever made an interpreter could you answer these, thanks!
1) how long have you been in the computing industry?
2) what got you into interpreters?
3) what do you think is the hardest part about creating an interpreter?
4) what do you think aare the best practices for creating an interpreter
5) do you think its best to create a language or create your own?9
Just typed this into the Python interpreter and my whole system just froze. Guess I have to do a force shutdown.
x = list(range(1, 999999999))
So is there a way you can somehow configure your linux system such that the window manager/system is never out of memory or processor time? So that atleast I get can atleast kill the process which is freezing the system.5
So, the PowerQuery type system appears to be a Joke.
For those you that aren't familiar with PowerQuery, it's the ETL language that is used in PowerBI, and some other parts of the MS PowerPlatform. It was formerly known as the M Language.
The language has a type system, that includes records (think hashes) and tables, which are, for practical purposes, a list of records.
The wonderful M language specification document states that:
"Any value that is a record conforms to the intrinsic type record, which does not place any restrictions on the field names or values within a record value. A record-type value is used to restrict the set of valid names as well as the types of values that are permitted to be associated with those names."
Except that the restriction is only to the set of valid names, and the language interpreter doesn't throw an error when I place a number into a text field, but also doesn't do any sort of implicit conversion. This is all hunky-dory, until you then try to load the data into the Tabular Model that underlies the query engine, which does expect the values to be of the type that is specified, and it throws an error.
But PowerBI, in its infinite wisdom, doesn't actually *record* the error, it merely tells you the error exists, and tells you to go back to the query editor to list the errors thrown up by the powerquery engine. Which, as previously stated, doesn't throw up an error for this instance.
So I've spent all afternoon trying to work out why my queries aren't loading, because I have an error that doesn't exist. fml.
[You can follow this issue on the communtiy feedback site here: https://community.powerbi.com/t5/... ]
To all node developers...
Is there actually a pure standard library into node? I looked at the docs and as Hello World it uses Express.js, so I'm wondering if there's actually something beyond the interpreter inside node.5
Coolest but probably most unnecessary feature in the dev world: A whitespace (programming language) to Java bytecode transpiler. Well I kinda started, but never finished actually due to lack of motivation to really finish it. At least the Parser and Interpreter were fully functional.
After trying to print colored text to the console using a portable Python 3 interpreter on Windows I came up with a "solution". I tried pretty much everything possible (I could think of): curses couldn't be loaded, ansi didn't work and installing libraries wasn't really an option, because it's not my device. Fuck portable interpreters and have fun with the "solution".
Def color_print(text, color):
text = text.replace("\n", "\\\" \\\"")
os.system ("powershell \"$host.ui.RawUi.ForegroundColor = \\\"" + color + "\\\"; echo \\\"" + test + "\\\"; $host.ui.RawUi.ForegroundColor = \\\"Gray\\\"")
It's slow, unreadable, only works for on Windows and requires powershell and is probably the worst piece of code I ever wrote, but it works 👍.2
I'm asking for your help, once again, because I couldn't find any similar problem online.
I've written this neat thingy here, in Go
And i try to integrate the wren-interpreter with it (is written in C).
All compiles and works, but I can't print to Stdout from the C-Code.
Any of you know what could cause this?1
Honestly couldn't batten it down, but it's probably somewhere around 3-4 hours. Did a few hacking competitions in college, and that's about the longest I can handle being fully productive. Nothing like a hackerrank from hell where the Perl interpreter didn't work (I know, Perl, yucky), so I was struggling to code in Python during the competition!
PM2 is one of these tools that just works. (and I'm not even using to run the interpreter it's supposed to be used with.)
pm2 + rails = <3
What is your favorite programming language to implement algorithms and data structure?
Or to be more specific, if you write interpreter and compiler, what is your choice of tool?6